mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
localized moderation, sidebar, userbox, etc.
This commit is contained in:
parent
f011fddc9d
commit
cd2685a179
9 changed files with 49 additions and 37 deletions
|
@ -14,5 +14,5 @@
|
|||
|
||||
- if @timeline.next_page
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @timeline.current_page }}
|
||||
Load more
|
||||
= t 'views.actions.load'
|
||||
.visible-xs= render 'shared/links'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- if report.moderation_comments.all.count == 0
|
||||
There are no comments yet.
|
||||
= t 'views.answerbox.no_comment'
|
||||
- else
|
||||
%ul.comments
|
||||
- report.moderation_comments.order(:created_at).each do |comment|
|
||||
|
@ -21,7 +21,7 @@
|
|||
%li.text-danger
|
||||
%a{href: '#', tabindex: -1, data: { action: 'mod-comment-destroy', id: comment.id }}
|
||||
%i.fa.fa-trash-o
|
||||
Delete
|
||||
= t 'views.actions.delete'
|
||||
%p.comments--content= comment.content
|
||||
.form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }}
|
||||
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'mod-comment-new', data: { id: report.id }}
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%a.navbar-brand{href: "/"} Moderation
|
||||
%a.navbar-brand{href: moderation_path} Moderation
|
||||
#j2-tl-navbar-collapse.collapse.navbar-collapse
|
||||
%ul.nav.navbar-nav
|
||||
= nav_entry "All reports", moderation_path
|
||||
= nav_entry "Answers", moderation_path('answer')
|
||||
= nav_entry "Comments", moderation_path('comment')
|
||||
= nav_entry "Users", moderation_path('user')
|
||||
= nav_entry "Questions", moderation_path('question')
|
||||
= 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')
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
.col-md-3.col-sm-3.col-xs-12
|
||||
.panel.panel-default.hidden-xs
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
= list_group_item "All reports", moderation_path
|
||||
= list_group_item "Answers", moderation_path('answer')
|
||||
= list_group_item "Comments", moderation_path('comment')
|
||||
= list_group_item "Users", moderation_path('user')
|
||||
= list_group_item "Questions", moderation_path('question')
|
||||
= list_group_item t('views.moderation.tabs.all'), moderation_path
|
||||
= list_group_item t('views.general.answer').pluralize(2), moderation_path('answer')
|
||||
= list_group_item t('views.general.comment').pluralize(2), moderation_path('comment')
|
||||
= list_group_item t('views.general.user').pluralize(2), moderation_path('user')
|
||||
= list_group_item t('views.general.question').pluralize(2), moderation_path('question')
|
||||
|
|
|
@ -2,12 +2,7 @@
|
|||
.panel.panel-default.moderationbox{data: { id: report.id }}
|
||||
.panel-heading
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(report.user)}
|
||||
= user_screen_name report.user
|
||||
reported a
|
||||
= report.type.sub('Reports::', '')
|
||||
%span{title: report.created_at, data: { toggle: :tooltip, placement: :bottom }}
|
||||
= time_ago_in_words(report.created_at)
|
||||
ago
|
||||
= raw t('views.moderation.moderationbox.reported', user: user_screen_name(report.user), content: report.type.sub('Reports::', ''), time: time_tooltip(report))
|
||||
.panel-body
|
||||
%p
|
||||
- if report.type == 'Reports::User'
|
||||
|
@ -15,8 +10,7 @@
|
|||
- else
|
||||
= report.target.content
|
||||
%p
|
||||
%b
|
||||
Reason:
|
||||
%b= t 'views.moderation.moderationbox.reason'
|
||||
%br
|
||||
- (report.reason || "No reason provided.").lines.each do |reason|
|
||||
- next unless reason.strip.length > 0
|
||||
|
@ -25,11 +19,10 @@
|
|||
.row
|
||||
.col-md-6.col-sm-4.col-xs-6.text-left
|
||||
%a.btn.btn-primary{href: content_url(report)}
|
||||
View reported
|
||||
= report.type.sub('Reports::', '')
|
||||
= t('views.moderation.moderationbox.view', content: report.type.sub('Reports::', ''))
|
||||
- if report.target.respond_to? :user and not report.target.user.nil?
|
||||
%a.btn.btn-primary{href: show_user_profile_path(report.target.user.screen_name)}
|
||||
View reported User
|
||||
= t('views.moderation.moderationbox.view', content: t('views.general.user'))
|
||||
.col-md-6.col-sm-8.col-xs-6.text-right
|
||||
%span.mod-count{id: "mod-count-#{report.id}"}
|
||||
= report.votes
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
.panel.panel-default
|
||||
.panel-body
|
||||
- if @services.count > 0
|
||||
Sharing is enabled for the following services:
|
||||
= t 'views.settings.service.enabled'
|
||||
- else
|
||||
You have not connected any services yet.
|
||||
= t 'views.settings.service.none'
|
||||
|
||||
- APP_CONFIG['sharing'].each do |service, service_options|
|
||||
- if service_options['enabled'] and !@services.any? { |x| x.provider == service.to_s }
|
||||
%p=link_to "Connect to #{service.capitalize}", "/auth/#{service}"
|
||||
%p=link_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}"
|
||||
|
||||
- if @services.count > 0
|
||||
%ul.list-group
|
||||
|
@ -21,4 +21,4 @@
|
|||
%i{class: "fa fa-#{service.provider}"}
|
||||
%strong= service.provider.capitalize
|
||||
(#{service.nickname})
|
||||
= link_to 'Disconnect', service_path(service), data: { confirm: "Really disconnect service #{service.provider.capitalize}?" }, method: :delete
|
||||
= link_to t('views.settings.service.disconnect'), service_path(service), data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) }, method: :delete
|
||||
|
|
|
@ -17,21 +17,21 @@
|
|||
%a{href: show_user_followers_path(current_user.screen_name)}
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%h4.entry-text#follower-count= current_user.follower_count
|
||||
%h6.entry-subtext Followers
|
||||
%h6.entry-subtext= t('views.general.follower').pluralize(current_user.follower_count)
|
||||
%a{href: show_user_friends_path(current_user.screen_name)}
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%h4.entry-text#friend-count= current_user.friend_count
|
||||
%h6.entry-subtext Following
|
||||
%h6.entry-subtext= t('views.general.following')
|
||||
.panel.panel-default.hidden-xs
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
= list_group_item "Timeline", root_path
|
||||
= list_group_item "Public", public_timeline_path
|
||||
= list_group_item t('views.general.timeline'), root_path
|
||||
= list_group_item t('views.general.public'), public_timeline_path
|
||||
- current_user.groups.each do |group|
|
||||
= list_group_item group.display_name, group_timeline_path(group.name)
|
||||
- unless @group.nil?
|
||||
.panel.panel-default.profile--panel.hidden-xs
|
||||
.panel-heading
|
||||
%h3.panel-title Members
|
||||
%h3.panel-title= t('views.group.members')
|
||||
.panel-body
|
||||
- @group.members.each do |member|
|
||||
%a{href: show_user_profile_path(member.user.screen_name), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top }}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
.row
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%h4.entry-text#asked-count= user.asked_count
|
||||
%h6.entry-subtext Questions
|
||||
%h6.entry-subtext= t('views.general.question').pluralize(user.asked_count)
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%h4.entry-text#answered-count= user.answered_count
|
||||
%h6.entry-subtext Answers
|
||||
= render 'user/actions', user: user, type: type
|
||||
%h6.entry-subtext= t('views.general.answer').pluralize(user.answered_count)
|
||||
= render 'user/actions', user: user, type: type
|
||||
|
|
|
@ -75,6 +75,12 @@ en:
|
|||
smile: "Smile"
|
||||
follower: "Follower"
|
||||
following: "Following"
|
||||
timeline: "Timeline"
|
||||
public: "Public"
|
||||
user: "User"
|
||||
group:
|
||||
title: "Group"
|
||||
members: "Members"
|
||||
actions:
|
||||
title: "Actions"
|
||||
answer: "Answer"
|
||||
|
@ -100,6 +106,13 @@ en:
|
|||
destroy: "Logout"
|
||||
create: "Sign in"
|
||||
new: "Sign up"
|
||||
moderation:
|
||||
tabs:
|
||||
all: "All reports"
|
||||
moderationbox:
|
||||
reported: "%{user} reported a %{content} %{time} ago"
|
||||
reason: "Reason:"
|
||||
view: "View reported %{content}"
|
||||
navigation:
|
||||
timeline: "Timeline"
|
||||
inbox: "Inbox"
|
||||
|
@ -227,6 +240,12 @@ en:
|
|||
anonymous: "Allow anonymous questions"
|
||||
public: "Show your answers in the public timeline"
|
||||
stranger: "Allow other people to answer your questions"
|
||||
service:
|
||||
enabled: "Sharing is enabled for the following services:"
|
||||
none: "You have not connected any services yet."
|
||||
connect: "Connect to %{service}"
|
||||
disconnect: "Disconnect"
|
||||
confirm: "Really disconnect service %{service}?"
|
||||
modal:
|
||||
bancontrol:
|
||||
title: "Ban Control Center"
|
||||
|
|
Loading…
Reference in a new issue