Fix lints in app/views/notifications

This commit is contained in:
Andreas Nedbal 2020-05-10 11:10:06 +02:00
parent 2d4726c297
commit d27ef3aae5
6 changed files with 23 additions and 22 deletions

View File

@ -1,11 +1,11 @@
.card
%ul#notifications.list-group
- if @notifications.count == 0
%ul.list-group#notifications
- if @notifications.count.zero?
%li.list-group-item.text-center
.notifications--none
%i.fa.fa-bell-o.notification__bell-icon
%p
- if params[:type] != "all"
- if params[:type] != 'all'
No new notifications.
- else
No notifications.
@ -19,5 +19,5 @@
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @notifications_last_id, permitted_params: %i[type]
- if @more_data_available
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @notifications_last_id }}
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @notifications_last_id } }
Load more

View File

@ -6,7 +6,7 @@
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
= user_screen_name notification.target.user
answered
= link_to "your question", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)
= link_to 'your question', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)
= time_tooltip(notification.target)
ago
.list-group
@ -14,9 +14,9 @@
.media.question-media
.media-body
%h6.notification__list-heading question
= markdown notification.target.question.content[0..60] + "#{notification.target.question.content.length > 60 ? '[...]' : ''}"
= markdown notification.target.question.content[0..60] + (notification.target.question.content.length > 60 ? '[...]' : '')
.list-group-item
.media.question-media
.media-body
%h6.notification__list-heading answer
= markdown notification.target.content[0..60] + "#{notification.target.content.length > 60 ? '[...]' : ''}"
= markdown notification.target.content[0..60] + (notification.target.content.length > 60 ? '[...]' : '')

View File

@ -7,11 +7,12 @@
= user_screen_name notification.target.user
commented on
- if notification.target.answer.user == current_user
= link_to "your answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
= link_to 'your answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
- elsif notification.target.user == notification.target.answer.user
= link_to "their answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
= link_to 'their answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
- else
= link_to "#{notification.target.answer.user.screen_name}'s answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
= link_to "#{notification.target.answer.user.screen_name}'s answer",
show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
= time_tooltip(notification.target)
ago
.list-group
@ -19,9 +20,9 @@
.media.question-media
.media-body
%h6.notification__list-heading answer
= markdown notification.target.answer.content[0..60] + "#{notification.target.answer.content.length > 60 ? '[...]' : ''}"
= markdown notification.target.answer.content[0..60] + (notification.target.answer.content.length > 60 ? '[...]' : '')
.list-group-item
.media.question-media
.media-body
%h6.notification__list-heading comment
= markdown notification.target.content[0..60] + "#{notification.target.content.length > 60 ? '[...]' : ''}"
= markdown notification.target.content[0..60] + (notification.target.content.length > 60 ? '[...]' : '')

View File

@ -6,7 +6,7 @@
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
= user_screen_name notification.target.user
smiled
= link_to "your comment", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.comment.answer.id)
= link_to 'your comment', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.comment.answer.id)
= time_tooltip(notification.target)
ago
.list-group
@ -14,4 +14,4 @@
.media.question-media
.media-body
%h6.notification__list-heading comment
= markdown notification.target.comment.content[0..60] + "#{notification.target.comment.content.length > 60 ? '[...]' : ''}"
= markdown notification.target.comment.content[0..60] + (notification.target.comment.content.length > 60 ? '[...]' : '')

View File

@ -6,7 +6,7 @@
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
= user_screen_name notification.target.user
smiled
= link_to "your answer", show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
= link_to 'your answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
= time_tooltip(notification.target)
ago
.list-group
@ -14,4 +14,4 @@
.media.question-media
.media-body
%h6.notification__list-heading answer
= markdown notification.target.answer.content[0..60] + "#{notification.target.answer.content.length > 60 ? '[...]' : ''}"
= markdown notification.target.answer.content[0..60] + (notification.target.answer.content.length > 60 ? '[...]' : '')