Fix lints in app/views/navigation
This commit is contained in:
parent
d27ef3aae5
commit
730b6156ce
|
@ -1,10 +0,0 @@
|
|||
%nav.navbar.navbar-light.navbar-static-top.j2-navbar.d-flex.d-sm-none.bg-white{role: "navigation"}
|
||||
%a.navbar-brand{href: "/"} Timelines
|
||||
%button.navbar-toggler{"data-target" => "#j2-tl-navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%span.sr-only Toggle navigation
|
||||
%span.navbar-toggler-icon
|
||||
#j2-tl-navbar-collapse.collapse.navbar-collapse
|
||||
%ul.nav.navbar-nav
|
||||
= nav_entry "Public", public_timeline_path
|
||||
- current_user.groups.each do |group|
|
||||
= nav_entry group.display_name, group_timeline_path(group.name)
|
|
@ -1,10 +1,10 @@
|
|||
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{role: "navigation"}
|
||||
.container{class: ios_web_app? ? "ios-web-app" : ''}
|
||||
%a.navbar-brand{href: "/"}= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{ role: 'navigation' }
|
||||
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
|
||||
%a.navbar-brand{ href: '/' }= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{ data: { target: '#j2-main-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
%span.navbar-toggler-icon
|
||||
#j2-main-navbar-collapse.collapse.navbar-collapse
|
||||
.collapse.navbar-collapse#j2-main-navbar-collapse
|
||||
%ul.nav.navbar-nav.ml-auto
|
||||
= nav_entry t('views.sessions.create'), new_user_session_path
|
||||
= nav_entry t('views.sessions.new'), new_user_registration_path
|
|
@ -1,28 +1,28 @@
|
|||
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{role: "navigation"}
|
||||
.container{class: ios_web_app? ? "ios-web-app" : ''}
|
||||
%a.navbar-brand{href: "/"}= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{ role: 'navigation' }
|
||||
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
|
||||
%a.navbar-brand{ href: '/' }= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{ data: { target: '#j2-main-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
%span.navbar-toggler-icon
|
||||
#j2-main-navbar-collapse.collapse.navbar-collapse
|
||||
.collapse.navbar-collapse#j2-main-navbar-collapse
|
||||
%ul.nav.navbar-nav.mr-auto
|
||||
= nav_entry t('views.navigation.timeline'), root_path
|
||||
= nav_entry t('views.navigation.inbox'), "/inbox", badge: inbox_count
|
||||
= nav_entry t('views.navigation.inbox'), '/inbox', badge: inbox_count
|
||||
- if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
|
||||
= nav_entry t('views.navigation.discover'), discover_path
|
||||
%ul.nav.navbar-nav
|
||||
- unless @user.nil?
|
||||
- unless @user == current_user
|
||||
%li.nav-item.d-none.d-sm-block{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.group')}
|
||||
%a.nav-link{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
|
||||
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t('views.actions.group') }
|
||||
%a.nav-link{ href: '#', data: { target: '#modal-group-memberships', toggle: :modal } }
|
||||
%i.fa.fa-users.hidden-xs
|
||||
%span.d-none.d-sm-inline.d-md-none= t('views.actions.group')
|
||||
= render "navigation/main/notifications"
|
||||
%li.nav-item.d-none.d-sm-block{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.ask_question')}
|
||||
%a.nav-link{href: "#", name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal"}
|
||||
= render 'navigation/main/notifications'
|
||||
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t('views.actions.ask_question') }
|
||||
%a.nav-link{ href: '#', name: 'toggle-all-ask', data: { target: '#modal-ask-followers', toggle: :modal } }
|
||||
%i.fa.fa-pencil-square-o
|
||||
= render "navigation/main/profile"
|
||||
= render 'navigation/main/profile'
|
||||
|
||||
= render 'modal/ask'
|
||||
%button.btn.btn-primary.btn-fab.d-block.d-sm-none{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
|
||||
%button.btn.btn-primary.btn-fab.d-block.d-sm-none{ data: { target: '#modal-ask-followers', toggle: :modal }, type: 'button' }
|
||||
%i.fa.fa-pencil-square-o
|
|
@ -1,13 +1,13 @@
|
|||
%nav.navbar.navbar-light.bg-light.navbar-static-top.j2-navbar.d-flex.d-sm-none{role: "navigation"}
|
||||
%a.navbar-brand{href: moderation_path} Moderation
|
||||
%button.navbar-toggler{"data-target" => "#j2-tl-navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%nav.navbar.navbar-light.bg-light.navbar-static-top.j2-navbar.d-flex.d-sm-none{ role: 'navigation' }
|
||||
%a.navbar-brand{ href: moderation_path } Moderation
|
||||
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
%span.navbar-toggler-icon
|
||||
#j2-tl-navbar-collapse.collapse.navbar-collapse
|
||||
.collapse.navbar-collapse#j2-tl-navbar-collapse
|
||||
%ul.nav.navbar-nav
|
||||
= nav_entry t('views.moderation.tabs.all'), moderation_path
|
||||
= nav_entry t('views.general.answer').pluralize(2) , moderation_path('answer')
|
||||
= nav_entry t('views.general.comment').pluralize(2), moderation_path('comment')
|
||||
= nav_entry t('views.general.user').pluralize(2) , moderation_path('user')
|
||||
= nav_entry t('views.general.question').pluralize(2), moderation_path('question')
|
||||
= nav_entry 'Priority', moderation_priority_path
|
||||
= nav_entry t('views.general.answer').pluralize(2), moderation_path('answer')
|
||||
= nav_entry t('views.general.comment').pluralize(2), moderation_path('comment')
|
||||
= nav_entry t('views.general.user').pluralize(2), moderation_path('user')
|
||||
= nav_entry t('views.general.question').pluralize(2), moderation_path('question')
|
||||
= nav_entry 'Priority', moderation_priority_path
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
%nav.navbar.navbar-light.bg-white.navbar-static-top.j2-navbar.d-flex.d-sm-none{role: "navigation"}
|
||||
%a.navbar-brand{href: notifications_path} Notifications
|
||||
%button.navbar-toggler{"data-target" => "#j2-tl-navbar-collapse", "data-toggle" => "collapse", type: "button"}
|
||||
%nav.navbar.navbar-light.bg-white.navbar-static-top.d-flex.d-sm-none{ role: 'navigation' }
|
||||
%a.navbar-brand{ href: notifications_path } Notifications
|
||||
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
%span.navbar-toggler-icon
|
||||
#j2-tl-navbar-collapse.collapse.navbar-collapse
|
||||
.collapse.navbar-collapse#j2-tl-navbar-collapse
|
||||
%ul.nav.navbar-nav
|
||||
= nav_entry "New Notifications", notifications_path
|
||||
= nav_entry "All Notifications", notifications_path('all')
|
||||
= nav_entry 'New Notifications', notifications_path
|
||||
= nav_entry 'All Notifications', notifications_path('all')
|
||||
= nav_entry t('views.notifications.tabs.answer'), notifications_path('answer')
|
||||
= nav_entry t('views.notifications.tabs.smile'), notifications_path('smile')
|
||||
= nav_entry t('views.notifications.tabs.comment'), notifications_path('comment')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
= nav_entry t('views.navigation.notifications'), notifications_path, badge: notification_count, class: 'd-block d-sm-none'
|
||||
- notifications = Notification.for(current_user).where(new: true).limit(4)
|
||||
%li.nav-item.dropdown.d-none.d-sm-block
|
||||
%a.nav-link.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
|
||||
%a.nav-link.dropdown-toggle{ href: '#', data: { toggle: :dropdown } }
|
||||
- if notification_count.nil?
|
||||
%i.fa.fa-bell-o
|
||||
- else
|
||||
|
@ -9,11 +9,11 @@
|
|||
%span.sr-only Notifications
|
||||
%span.badge= notification_count
|
||||
.dropdown-menu.dropdown-menu-right.notification-dropdown
|
||||
- if notifications.count == 0
|
||||
- if notifications.count.zero?
|
||||
.dropdown-item.text-center.p-2
|
||||
%i.fa.fa-bell-o.notification__bell-icon
|
||||
%p No new notifications.
|
||||
%a.dropdown-item.text-center{href: notifications_path('all')}
|
||||
%a.dropdown-item.text-center{ href: notifications_path('all') }
|
||||
%i.fa.fa-fw.fa-chevron-right
|
||||
Show all notifications
|
||||
- else
|
||||
|
@ -21,6 +21,6 @@
|
|||
.dropdown-item
|
||||
= render "notifications/type/#{notification.target_type.downcase}", notification: notification
|
||||
|
||||
%a.dropdown-item.text-center{href: notifications_path}
|
||||
%a.dropdown-item.text-center{ href: notifications_path }
|
||||
%i.fa.fa-fw.fa-chevron-right
|
||||
Show all new notifications
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
%li.nav-item.dropdown.profile--image-dropdown
|
||||
%a.nav-link.dropdown-toggle.p-sm-0{href: "#", "data-toggle" => "dropdown"}
|
||||
%img.avatar-md.d-none.d-sm-inline{src: current_user.profile_picture.url(:small)}
|
||||
%a.nav-link.dropdown-toggle.p-sm-0{ href: '#', data: { toggle: :dropdown } }
|
||||
%img.avatar-md.d-none.d-sm-inline{ src: current_user.profile_picture.url(:small) }
|
||||
%span.d-inline.d-sm-none
|
||||
= current_user.screen_name
|
||||
%b.caret
|
||||
.dropdown-menu
|
||||
%h6.dropdown-header.d-none.d-sm-block= current_user.screen_name
|
||||
%a.dropdown-item{href: show_user_profile_path(current_user.screen_name)}
|
||||
%a.dropdown-item{ href: show_user_profile_path(current_user.screen_name) }
|
||||
%i.fa.fa-fw.fa-user
|
||||
= t('views.navigation.show')
|
||||
%a.dropdown-item{href: edit_user_registration_path}
|
||||
%a.dropdown-item{ href: edit_user_registration_path }
|
||||
%i.fa.fa-fw.fa-cog
|
||||
= t('views.navigation.settings')
|
||||
.dropdown-divider
|
||||
- if current_user.has_role?(:administrator)
|
||||
%a.dropdown-item{href: rails_admin_path}
|
||||
%a.dropdown-item{ href: rails_admin_path }
|
||||
%i.fa.fa-fw.fa-cogs
|
||||
= t('views.navigation.admin')
|
||||
%a.dropdown-item{href: sidekiq_web_path}
|
||||
%a.dropdown-item{ href: sidekiq_web_path }
|
||||
%i.fa.fa-fw.fa-bar-chart
|
||||
= t('views.navigation.sidekiq')
|
||||
%a.dropdown-item{href: pghero_path}
|
||||
%a.dropdown-item{ href: pghero_path }
|
||||
%i.fa.fa-fw.fa-database
|
||||
Database Monitor
|
||||
%a.dropdown-item{href: announcement_index_path}
|
||||
%a.dropdown-item{ href: announcement_index_path }
|
||||
%i.fa.fa-fw.fa-info
|
||||
Announcements
|
||||
.dropdown-divider
|
||||
- if current_user.mod?
|
||||
%a.dropdown-item{href: moderation_path}
|
||||
%a.dropdown-item{ href: moderation_path }
|
||||
%i.fa.fa-fw.fa-gavel
|
||||
= t('views.navigation.moderation')
|
||||
.dropdown-divider
|
||||
%a.dropdown-item{href: destroy_user_session_path, data: {method: :delete} }
|
||||
%a.dropdown-item{ href: destroy_user_session_path, data: { method: :delete } }
|
||||
%i.fa.fa-fw.fa-sign-out
|
||||
= t 'views.sessions.destroy'
|
||||
|
|
Loading…
Reference in New Issue