Move invitation form under the user search in admin

Indicates when there is no report to review to avoid a weird empty page
This commit is contained in:
flaburgan 2017-03-16 12:46:59 +01:00 committed by Benjamin Neff
parent 5cb4c6e5df
commit 7bdf33e1a8
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
3 changed files with 20 additions and 13 deletions

View file

@ -10,3 +10,6 @@
- if unreviewed_reports_count > 0
.alert.alert-warning.reports-warning{role: "alert"}
= t("report.unreviewed_reports", count: unreviewed_reports_count)
- else
%p
= t("report.unreviewed_reports", count: 0)

View file

@ -1,6 +1,6 @@
.col-md-9
.row
.user_search.col-md-8
.user_search.col-md-12
%h3= t("admins.admin_bar.user_search")
= form_for @search, url: {action: "user_search"}, html: {method: :get, class: "form-horizontal"} do |f|
.form-group
@ -27,7 +27,19 @@
.clearfix.col-sm-12
= submit_tag t("admins.stats.go"), class: "btn btn-primary pull-right block-admin"
.more_invites.col-md-4
.row
.col-md-12
.alert.alert-info.text-center{role: "alert"}
= t(".users", count: @users.count)
.row
.users.col-md-12
%ul.media-list
- @users.each do |user|
= render partial: "user_entry", locals: {user: user}
.row
.more_invites.col-md-12
%h3= t("shared.invitations.invites")
.clearfix#add-invites-section
!= t(".you_currently", count: current_user.invitation_code.count,
@ -43,14 +55,3 @@
.form-group
.clearfix.col-md-12
= submit_tag t(".invite"), class: "btn btn-default pull-right block-admin"
.row
.col-md-12
.alert.alert-info.text-center{role: "alert"}
= t(".users", count: @users.count)
.row
.users.col-md-12
%ul.media-list
- @users.each do |user|
= render partial: "user_entry", locals: {user: user}

View file

@ -2,6 +2,9 @@
#reports
%h1
= t("report.title")
- if @reports.size == 0
%p
= t("report.unreviewed_reports", count: 0)
- @reports.each do |report|
- if report.item
.panel.panel-default