Skip to content

User show#22

Open
yousukekaneko wants to merge 9 commits intodevelopmentfrom
user_show
Open

User show#22
yousukekaneko wants to merge 9 commits intodevelopmentfrom
user_show

Conversation

@yousukekaneko
Copy link
Collaborator

@yousukekaneko yousukekaneko commented Jun 9, 2018

WHAT
user/show画面の実装

WHY
必須画面の為

これから、user-showの画面実装を行います。
作業量重めのため、3日間工程で良いでしょうか?(月曜日夜完成予定)
@bambis13 bambis13 changed the title User show [WIP]User show Jun 12, 2018
@yousukekaneko
Copy link
Collaborator Author

#WHAT
user_showの実装
#WHY
必須機能のため

@bambis13
Copy link
Owner

レビューに出す時は[WIP]外しましょう〜!

@yousukekaneko
Copy link
Collaborator Author

すみません、[WIP]外しました。

以下、user/show画面になります。よろしくお願いします。
2018-06-18 22 29 47
2018-06-18 22 30 01

@yousukekaneko yousukekaneko changed the title [WIP]User show User show Jun 19, 2018
@katsunori-takahashi
Copy link
Collaborator

userのサムネイルって今の状態でuserに合わせて変わる状態ですか?
でもまぁ、view自体はできてるのでいいと思います!

@yousukekaneko
Copy link
Collaborator Author

関川くんのレビュー修正いたしました。
User.scss修正

高橋くん、左上のサムネイルはhostのimageになります。
hostの情報がないので、適当な画像を使っています。

2018-06-20 15 29 07

@yousukekaneko
Copy link
Collaborator Author

2018-06-20 15 33 59

Copy link
Collaborator

@ryosuke071111 ryosuke071111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

html/cssは完璧だと思うのですが、rails関連の記述は直した方が良いと思う箇所がいくつかありました!

.user-show-left-contents-1
#user-show-left-contents-2
#user-media-container
%img#user-show-img{alt: "", src: "https://s3-ap-northeast-1.amazonaws.com/airbnb-images-to-s3/sample_user_image3.png"}/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%img#user-show-img{alt: "", src: "https://s3-ap-northeast-1.amazonaws.com/airbnb-images-to-s3/sample_user_image3.png"}/

ここって@userの変数展開は要らないんでしたっけ。。?


.listing-detail
リスティング
%small.small-number (6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@user.homesみたいなやつ。。?

.panel-body
%dl.space-2.language-box
%dt.col-middle.dtbold 言語
%dd.col-middle.dtpadding English, Français
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@user.languageみたいなやつ。。?

%li.listings-item
%a.listings-item-image{href: "/users"}
.text-relative
%img.img-responsive-height{alt: "appartamento con giardino e piscina", height: "144", src: "https://a0.muscache.com/im/pictures/17758895/9908f050_original.jpg?aki_policy=small", title: "appartamento con giardino e piscina", width: "225"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@user.home.listing_photoみたいな。。?


.user-show-right-contents-1
.user-info-box
%h1.greeting-1 こんにちは、Mauroです!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@user.nameを入れられると思います。

.user-show-right-contents-1
.user-info-box
%h1.greeting-1 こんにちは、Mauroです!
.address-startday San Salvatore Monferrato, イタリア · 2013年1月からメンバー
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@user.prefecture
@user.country_id.name

.self-information-2
.self-information-3{style: "margin-top:0;margin-bottom:24px;margin-right:25px"}
%img.image-attribute{alt: "", height: "50", src: "https://a0.muscache.com/airbnb/static/badges/super_host_50_new-e5e09829e1fc5ffefdb2d7387590c462.png", width: "28"}
%span._mstzcu.host-box-1 スーパーホスト
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@user.superhostの有無で条件分岐できるかと!

= "(#{@users.count})"
.reviews_section.as_host ゲストからのレビュー

- @users.each do |user|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここはuserにひもづくレビュー一覧なので
@reviews...な気がします。。!

get 'search', to: 'homes#search'
resources :home_reservations, only: [:new, :create, :edit, :update]
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
get 'users' => 'users#show'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これだとユーザーのID別でuser#showの出し分けができないと思います。。!

class UsersController < ApplicationController

def show
@users = User.all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

userのidを取得できる記述を書いた方が良いかと思います。。!

class UsersController < ApplicationController

def show
@users = User.all
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここはできればそのリスティングのuser_idを取得してその人のshowだけ表示するにしたいところ...!

%i.fa.fa-flag-o このユーザーを報告
%p.self-imformation-1 Here we are, Pina and Mauro. Our adventure began thirty years ago with the house on the hill, the refuge of the family: two daughters, a grandmother with a passion for the vegetable garden and lots of animals! We offer a discreet hospitality, genuine lifestyle and enjoyment of uncontaminated nature. There you will meet us collecting fruits or eggs from our hens, while we dry herbs for infusions, or in the cellar to bottle the wine.
.self-information-2
.self-information-3{style: "margin-top:0;margin-bottom:24px;margin-right:25px"}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これはscssであてたい...!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応しました。

.self-information-3{style: "margin-top:0;margin-bottom:24px;margin-right:25px"}
%a._t8unl0{href: "/users/show/4655535#reviews", rel: "noopener noreferrer nofollow"}
._1lhqvjz
#undefined_count._186vx4j
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要なclass,divは削除しましょう!

@@ -0,0 +1,5 @@
class AddAvatarToUsers < ActiveRecord::Migration[5.1]
def change
add_column :users, :avatar, :string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これstringで大丈夫ですか?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stringで問題なさそうです。
(AWSのS3から画像引っ張ってくるなら、255ビット超えないだろうと、、、)

get 'search', to: 'homes#search'
resources :home_reservations, only: [:new, :create, :edit, :update]
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
get 'users' => 'users#show'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resources onlyにしましょう!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更しました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants