Fix lints in app/views/user
This commit is contained in:
parent
caa6b27684
commit
e08f9dafab
|
@ -3,7 +3,7 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-3.col-xs-12.col-sm-4
|
||||
= render 'user/profile'
|
||||
= render 'user/profile', user: @user
|
||||
.d-none.d-sm-block= render 'shared/links'
|
||||
.col-md-9.col-xs-12.col-sm-8
|
||||
= render "questionbox"
|
||||
|
@ -13,4 +13,4 @@
|
|||
= render 'modal/group'
|
||||
- if current_user.mod? and @user != current_user
|
||||
= render 'modal/privileges'
|
||||
= render 'modal/ban'
|
||||
= render 'modal/ban'
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
.profile__actions
|
||||
- if user_signed_in?
|
||||
- type ||= :nil
|
||||
- if user == current_user
|
||||
%a.btn.btn-dark.btn-block{href: edit_user_profile_path} Edit profile
|
||||
- type ||= :nil
|
||||
- if user_signed_in? && user == current_user
|
||||
%a.btn.btn-dark.btn-block{ href: edit_user_profile_path } Edit profile
|
||||
- elsif user_signed_in?
|
||||
- if current_user.following? user
|
||||
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } }
|
||||
= t 'views.actions.unfollow'
|
||||
- else
|
||||
- if current_user.following? user
|
||||
%button#editprofile.btn.btn-primary.btn-block{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }}
|
||||
= t 'views.actions.unfollow'
|
||||
- else
|
||||
%button#editprofile.btn.btn-primary.btn-block{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }}
|
||||
= t 'views.actions.follow'
|
||||
- unless user == current_user
|
||||
.btn-group.btn-block
|
||||
%button.btn.btn-light.btn-block.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
|
||||
= t 'views.actions.title'
|
||||
%span.caret
|
||||
.dropdown-menu
|
||||
%a.dropdown-item.d-block.d-sm-none{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
|
||||
%i.fa.fa-users
|
||||
= t 'views.actions.group'
|
||||
%a.dropdown-item{href: '#', data: { action: 'report-user', target: user.screen_name }}
|
||||
%i.fa.fa-exclamation-triangle
|
||||
= t 'views.actions.report'
|
||||
- if current_user.mod?
|
||||
%a.dropdown-item{href: '#', data: { target: "#modal-privileges", toggle: :modal }}
|
||||
%i.fa.fa-wrench
|
||||
= raw t('views.actions.privilege', user: user.screen_name)
|
||||
- unless user.has_role?(:administrator)
|
||||
%a.dropdown-item{href: '#', data: { target: "#modal-ban", toggle: :modal }}
|
||||
%i.fa.fa-ban
|
||||
= t 'views.actions.ban'
|
||||
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name } }
|
||||
= t 'views.actions.follow'
|
||||
.btn-group.btn-block
|
||||
%button.btn.btn-light.btn-block.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
||||
= t 'views.actions.title'
|
||||
%span.caret
|
||||
.dropdown-menu
|
||||
%a.dropdown-item.d-block.d-sm-none{ href: '#', data: { target: '#modal-group-memberships', toggle: :modal } }
|
||||
%i.fa.fa-users
|
||||
= t 'views.actions.group'
|
||||
%a.dropdown-item{ href: '#', data: { action: 'report-user', target: user.screen_name } }
|
||||
%i.fa.fa-exclamation-triangle
|
||||
= t 'views.actions.report'
|
||||
- if current_user.mod?
|
||||
%a.dropdown-item{ href: '#', data: { target: '#modal-privileges', toggle: :modal } }
|
||||
%i.fa.fa-wrench
|
||||
= raw t('views.actions.privilege', user: user.screen_name)
|
||||
- unless user.has_role?(:administrator)
|
||||
%a.dropdown-item{ href: '#', data: { target: '#modal-ban', toggle: :modal } }
|
||||
%i.fa.fa-ban
|
||||
= t 'views.actions.ban'
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
.card#profile
|
||||
%img.profile__avatar{src: @user.profile_picture.url(:large)}
|
||||
%img.profile__avatar{ src: user.profile_picture.url(:large) }
|
||||
.card-body
|
||||
.profile__name
|
||||
- unless @user.display_name.blank?
|
||||
- unless user.display_name.blank?
|
||||
.profile__display-name
|
||||
= @user.display_name
|
||||
= user.display_name
|
||||
.profile__screen-name
|
||||
= @user.screen_name
|
||||
= user.screen_name
|
||||
.profile__badge-container
|
||||
- if @user.banned?
|
||||
- if user.banned?
|
||||
%span.badge.badge-dark
|
||||
%i.fa.fa-fw.fa-ban
|
||||
= t 'views.user.title.banned'
|
||||
- if @user.following? current_user
|
||||
- if user.following? current_user
|
||||
.badge.badge-light
|
||||
= t 'views.user.follows_you'
|
||||
- if user_signed_in? && current_user.has_role?(:administrator)
|
||||
- if @user.has_role?(:administrator)
|
||||
- if user.has_role?(:administrator)
|
||||
%span.badge.badge-danger
|
||||
%i.fa.fa-fw.fa-flask
|
||||
= t 'views.user.title.admin'
|
||||
- if @user.has_role?(:moderator)
|
||||
- if user.has_role?(:moderator)
|
||||
%span.badge.badge-success
|
||||
%i.fa.fa-fw.fa-users
|
||||
= t 'views.user.title.moderator'
|
||||
- unless @user.bio.blank?
|
||||
- unless user.bio.blank?
|
||||
.profile__biography
|
||||
= markdown @user.bio
|
||||
- unless @user.website.blank?
|
||||
= markdown user.bio
|
||||
- unless user.website.blank?
|
||||
.profile__website
|
||||
%i.fa.fa-fw.fa-globe
|
||||
%a{href: @user.website}= @user.display_website
|
||||
- unless @user.location.blank?
|
||||
%a{ href: user.website }= user.display_website
|
||||
- unless user.location.blank?
|
||||
.profile__location
|
||||
%i.fa.fa-fw.fa-location-arrow
|
||||
= @user.location
|
||||
= render 'user/actions', user: @user, type: :follower
|
||||
= user.location
|
||||
= render 'user/actions', user: user, type: :follower
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render "settings/data"
|
||||
= render 'settings/data'
|
||||
|
||||
- provide(:title, generate_title("Your Data"))
|
||||
- parent_layout "user/settings"
|
||||
- provide(:title, generate_title('Your Data'))
|
||||
- parent_layout 'user/settings'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render "settings/profile"
|
||||
= render 'settings/profile'
|
||||
|
||||
- provide(:title, generate_title("Profile Settings"))
|
||||
- parent_layout "user/settings"
|
||||
- provide(:title, generate_title('Profile Settings'))
|
||||
- parent_layout 'user/settings'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render "settings/privacy"
|
||||
= render 'settings/privacy'
|
||||
|
||||
- provide(:title, generate_title("Privacy Settings"))
|
||||
- parent_layout "user/settings"
|
||||
- provide(:title, generate_title('Privacy Settings'))
|
||||
- parent_layout 'user/settings'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render "settings/theme"
|
||||
= render 'settings/theme'
|
||||
|
||||
- provide(:title, generate_title("Theme Settings"))
|
||||
- parent_layout "user/settings"
|
||||
- provide(:title, generate_title('Theme Settings'))
|
||||
- parent_layout 'user/settings'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= render "settings/export"
|
||||
= render 'settings/export'
|
||||
|
||||
- provide(:title, generate_title("Export"))
|
||||
- parent_layout "user/settings"
|
||||
- provide(:title, generate_title('Export'))
|
||||
- parent_layout 'user/settings'
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
%i.fa.fa-lock
|
||||
= group.display_name
|
||||
|
||||
- provide(:title, user_title(@user, "groups"))
|
||||
- parent_layout "user/profile"
|
||||
- provide(:title, user_title(@user, 'groups'))
|
||||
- parent_layout 'user/profile'
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @questions_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @questions_last_id }}
|
||||
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @questions_last_id } }
|
||||
= t 'views.actions.load'
|
||||
|
||||
- provide(:title, questions_title(@user))
|
||||
- parent_layout "user/profile"
|
||||
- parent_layout 'user/profile'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
.profile--panel-push-inner.hidden-xs
|
||||
- unless @user.banned?
|
||||
#answers
|
||||
- @answers.each do |a|
|
||||
|
@ -7,8 +6,8 @@
|
|||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @answers_last_id }}
|
||||
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @answers_last_id } }
|
||||
= t 'views.actions.load'
|
||||
|
||||
- provide(:title, user_title(@user))
|
||||
- parent_layout "user/profile"
|
||||
- parent_layout 'user/profile'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#users.row.row-cols-1.row-cols-sm-2.row-cols-md-3
|
||||
.row.row-cols-1.row-cols-sm-2.row-cols-md-3#users
|
||||
- @users.each do |user|
|
||||
.col
|
||||
= render 'shared/userbox', user: user
|
||||
|
@ -6,8 +6,8 @@
|
|||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @users_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @users_last_id }}
|
||||
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @users_last_id } }
|
||||
= t 'views.actions.load'
|
||||
|
||||
- provide(:title, user_title(@user, "friends and followers"))
|
||||
- parent_layout "user/profile"
|
||||
- provide(:title, user_title(@user, 'friends and followers'))
|
||||
- parent_layout 'user/profile'
|
||||
|
|
Loading…
Reference in New Issue