Fix lints in app/views/tabs

This commit is contained in:
Andreas Nedbal 2020-05-10 09:25:34 +02:00
parent e08f9dafab
commit a3117861c8
7 changed files with 38 additions and 28 deletions

View File

@ -4,6 +4,6 @@
= render 'shared/sidebar' = render 'shared/sidebar'
.col-md-9.col-xs-12.col-sm-8 .col-md-9.col-xs-12.col-sm-8
= render 'layouts/messages' = render 'layouts/messages'
= render 'tabs/feed' = render 'tabs/feed', group: @group
= yield = yield
.d-block.d-sm-none= render 'shared/links' .d-block.d-sm-none= render 'shared/links'

View File

@ -7,7 +7,7 @@
.d-none.d-sm-block= render 'shared/links' .d-none.d-sm-block= render 'shared/links'
.col-md-9.col-xs-12.col-sm-8 .col-md-9.col-xs-12.col-sm-8
= render "questionbox" = render "questionbox"
= render "tabs/profile" = render "tabs/profile", user: @user
= yield = yield
- if user_signed_in? - if user_signed_in?
= render 'modal/group' = render 'modal/group'

View File

@ -3,10 +3,10 @@
= list_group_item t('views.general.timeline'), root_path = list_group_item t('views.general.timeline'), root_path
- if APP_CONFIG.dig(:features, :public, :enabled) - if APP_CONFIG.dig(:features, :public, :enabled)
= list_group_item t('views.general.public'), public_timeline_path = list_group_item t('views.general.public'), public_timeline_path
.list-group-item.list-group-item-action.dropdown{class: "#{'active' if @group}"} .list-group-item.list-group-item-action.dropdown{ class: group ? 'active' : '' }
%a.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown' }, aria: { haspopup: true, expanded: false }} %a.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown' }, aria: { haspopup: true, expanded: false } }
- if @group - if group
= @group.display_name = group.display_name
- else - else
Groups Groups
.dropdown-menu .dropdown-menu

View File

@ -7,4 +7,4 @@
= list_group_item t('views.general.question').pluralize(2), moderation_path('question') = list_group_item t('views.general.question').pluralize(2), moderation_path('question')
= list_group_item 'Priority', moderation_priority_path = list_group_item 'Priority', moderation_priority_path
.d-none.d-sm-block= render "shared/links" .d-none.d-sm-block= render 'shared/links'

View File

@ -1,16 +1,26 @@
.card.d-none.d-sm-block .card.d-none.d-sm-block
.list-group .list-group
= list_group_item "New Notifications", notifications_path, badge: Notification.for(current_user).where(new: true).count = list_group_item 'New Notifications', notifications_path, badge: Notification.for(current_user).where(new: true).count
= list_group_item "All Notifications", notifications_path('all') = list_group_item 'All Notifications', notifications_path('all')
.card.d-none.d-sm-block .card.d-none.d-sm-block
.card-header .card-header
Filter by Type Filter by Type
.list-group .list-group
= list_group_item t('views.notifications.tabs.answer'), notifications_path('answer'), badge: Notification.for(current_user).where(target_type: "Answer", new: true).count = list_group_item t('views.notifications.tabs.answer'),
= list_group_item t('views.notifications.tabs.smile'), notifications_path('smile'), badge: Notification.for(current_user).where(target_type: "Smile", new: true).count notifications_path('answer'),
= list_group_item t('views.notifications.tabs.comment'), notifications_path('comment'), badge: Notification.for(current_user).where(target_type: "Comment", new: true).count badge: Notification.for(current_user).where(target_type: 'Answer', new: true).count
= list_group_item t('views.notifications.tabs.commentsmile'), notifications_path('commentsmile'), badge: Notification.for(current_user).where(target_type: "CommentSmile", new: true).count = list_group_item t('views.notifications.tabs.smile'),
= list_group_item t('views.notifications.tabs.relationship'), notifications_path('relationship'), badge: Notification.for(current_user).where(target_type: "Relationship", new: true).count notifications_path('smile'),
badge: Notification.for(current_user).where(target_type: 'Smile', new: true).count
= list_group_item t('views.notifications.tabs.comment'),
notifications_path('comment'),
badge: Notification.for(current_user).where(target_type: 'Comment', new: true).count
= list_group_item t('views.notifications.tabs.commentsmile'),
notifications_path('commentsmile'),
badge: Notification.for(current_user).where(target_type: 'CommentSmile', new: true).count
= list_group_item t('views.notifications.tabs.relationship'),
notifications_path('relationship'),
badge: Notification.for(current_user).where(target_type: 'Relationship', new: true).count
.d-none.d-sm-block= render "shared/links" .d-none.d-sm-block= render 'shared/links'

View File

@ -1,6 +1,6 @@
.card .card
.list-group.list-group-horizontal-sm.text-center .list-group.list-group-horizontal-sm.text-center
= list_group_item "Answers", show_user_profile_path(@user.screen_name), badge: @user.answered_count = list_group_item 'Answers', show_user_profile_path(user.screen_name), badge: user.answered_count
= list_group_item "Questions", show_user_questions_path(@user.screen_name), badge: @user.asked_count = list_group_item 'Questions', show_user_questions_path(user.screen_name), badge: user.asked_count
= list_group_item "Followers", show_user_followers_path(@user.screen_name), badge: @user.follower_count = list_group_item 'Followers', show_user_followers_path(user.screen_name), badge: user.follower_count
= list_group_item "Following", show_user_friends_path(@user.screen_name), badge: @user.friend_count = list_group_item 'Following', show_user_friends_path(user.screen_name), badge: user.friend_count

View File

@ -5,7 +5,7 @@
= list_group_item t('views.settings.tabs.privacy'), edit_user_privacy_path = list_group_item t('views.settings.tabs.privacy'), edit_user_privacy_path
= list_group_item t('views.settings.tabs.sharing'), services_path = list_group_item t('views.settings.tabs.sharing'), services_path
= list_group_item 'Theme', edit_user_theme_path = list_group_item 'Theme', edit_user_theme_path
= list_group_item "Your Data", user_data_path = list_group_item 'Your Data', user_data_path
= list_group_item 'Export', user_export_path = list_group_item 'Export', user_export_path
.d-none.d-sm-block= render "shared/links" .d-none.d-sm-block= render 'shared/links'