Add mobile message confirmation on user invit action, Refactor admin responsive code to use bootstrap grid
Hide pod version alert only in the mobile version, not depending on screen size
This commit is contained in:
parent
7bdf33e1a8
commit
a7d97b7fd3
14 changed files with 128 additions and 136 deletions
|
|
@ -16,10 +16,9 @@
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions{ width: 150px; }
|
|
||||||
|
|
||||||
.pull-right .label{ display: inline-block; }
|
.pull-right .label{ display: inline-block; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -32,9 +31,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pod stats
|
||||||
|
.segment-selection {
|
||||||
|
select,
|
||||||
|
[type=submit] {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** reported posts **/
|
/** reported posts **/
|
||||||
|
|
||||||
@import 'report';
|
.reports {
|
||||||
|
.reason-label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** pod list **/
|
/** pod list **/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
#app {
|
|
||||||
.pull-right,
|
|
||||||
input {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#admin-nav li a {
|
|
||||||
&:hover,
|
|
||||||
&:focus {
|
|
||||||
background-color: $gray-light;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media(max-width: $screen-xs-max) {
|
|
||||||
#app {
|
|
||||||
.block-admin {
|
|
||||||
display: block;
|
|
||||||
float: none;
|
|
||||||
font-size: 13px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
margin-top: 5px;
|
|
||||||
padding: 6px 12px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
@import "mobile/stream_element";
|
@import "mobile/stream_element";
|
||||||
@import "mobile/comments";
|
@import "mobile/comments";
|
||||||
@import 'mobile/openid_connect_error_page';
|
@import 'mobile/openid_connect_error_page';
|
||||||
@import 'mobile/admins';
|
|
||||||
|
|
||||||
@import 'typography';
|
@import 'typography';
|
||||||
|
|
||||||
|
|
@ -886,3 +885,9 @@ select#aspect_ids_ {
|
||||||
.form-control:active, .form-control:focus { border-color: #999999; }
|
.form-control:active, .form-control:focus { border-color: #999999; }
|
||||||
|
|
||||||
.tag_following_action { margin: 5px 0 10px 0; }
|
.tag_following_action { margin: 5px 0 10px 0; }
|
||||||
|
|
||||||
|
/* --- Admin pages --- */
|
||||||
|
.pod-version {
|
||||||
|
// The fetching of the pod version is not done on mobile currently so we hide this alert.
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
#reports {
|
|
||||||
.reason-label {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
form input {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
- content_for :head do
|
%h2= t(".pages")
|
||||||
= stylesheet_link_tag :admin
|
|
||||||
|
|
||||||
%ul.nav.nav-pills.nav-stacked#admin-nav
|
%ul.nav.nav-pills.nav-stacked#admin-nav
|
||||||
%li{role: "presentation", class: current_page?(admin_dashboard_path) && "active"}
|
%li{role: "presentation", class: current_page?(admin_dashboard_path) && "active"}
|
||||||
= link_to t(".dashboard"), admin_dashboard_path
|
= link_to t(".dashboard"), admin_dashboard_path
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
- content_for :head do
|
|
||||||
= stylesheet_link_tag :admin
|
|
||||||
|
|
||||||
.col-md-9
|
.col-md-9
|
||||||
#pod-status
|
#pod-status
|
||||||
%h2
|
%h2
|
||||||
= t(".pod_status")
|
= t(".pod_status")
|
||||||
.alert.alert-info.pod-version.hidden-xs{role: "alert"}
|
.alert.alert-info.pod-version{role: "alert"}
|
||||||
= t(".fetching_diaspora_version")
|
= t(".fetching_diaspora_version")
|
||||||
- if unreviewed_reports_count > 0
|
- if unreviewed_reports_count > 0
|
||||||
.alert.alert-warning.reports-warning{role: "alert"}
|
.alert.alert-warning.reports-warning{role: "alert"}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,27 @@
|
||||||
|
- content_for :head do
|
||||||
|
= stylesheet_link_tag :admin
|
||||||
|
|
||||||
.col-md-9
|
.col-md-9
|
||||||
%h1= t(".usage_statistic")
|
%h1= t(".usage_statistic")
|
||||||
|
|
||||||
.pull-right.block-admin
|
.row
|
||||||
= form_tag("/admins/stats", method: "get", class: "form-inline") do
|
= form_tag("/admins/stats", method: "get", class: "form-inline segment-selection") do
|
||||||
%select.form-control{name: "range"}
|
.col-sm-2.col-sm-push-8
|
||||||
%option{value: "daily", selected: ("selected" if params[:range] == "daily")}
|
%select.form-control{name: "range"}
|
||||||
= t(".daily")
|
%option{value: "daily", selected: ("selected" if params[:range] == "daily")}
|
||||||
%option{value: "week", selected: ("selected" if params[:range] == "week")}
|
= t(".daily")
|
||||||
= t(".week")
|
%option{value: "week", selected: ("selected" if params[:range] == "week")}
|
||||||
%option{value: "2weeks", selected: ("selected" if params[:range] == "2weeks")}
|
= t(".week")
|
||||||
= t(".2weeks")
|
%option{value: "2weeks", selected: ("selected" if params[:range] == "2weeks")}
|
||||||
%option{value: "month", selected: ("selected" if params[:range] == "month")}
|
= t(".2weeks")
|
||||||
= t(".month")
|
%option{value: "month", selected: ("selected" if params[:range] == "month")}
|
||||||
|
= t(".month")
|
||||||
|
.col-sm-2.col-sm-push-8
|
||||||
|
= submit_tag t(".go"), class: "btn btn-primary btn-block"
|
||||||
|
|
||||||
= submit_tag t(".go"), class: "btn btn-primary block-admin"
|
.col-sm-8.col-sm-pull-4
|
||||||
%h3
|
%h4
|
||||||
!= t("admins.stats.display_results", segment: content_tag(:strong, @segment))
|
!= t("admins.stats.display_results", segment: content_tag(:strong, @segment))
|
||||||
|
|
||||||
.row
|
.row
|
||||||
- %i(posts comments aspect_memberships users).each do |name|
|
- %i(posts comments aspect_memberships users).each do |name|
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,23 @@
|
||||||
|
|
||||||
%li.user.media
|
%li.user.media
|
||||||
.pull-left
|
.media-left
|
||||||
- if user.person
|
- if user.person
|
||||||
%span.media-object
|
.media-object
|
||||||
= person_image_tag(user.person, size: :thumb_small)
|
= person_image_tag(user.person, size: :thumb_small)
|
||||||
|
.media-body
|
||||||
.media-body.row
|
|
||||||
.pull-right
|
|
||||||
%span.label.label-default
|
|
||||||
= t(".id")
|
|
||||||
= user.id
|
|
||||||
%span.label.label-info
|
|
||||||
= t(".guid")
|
|
||||||
= user.person.guid if user.person
|
|
||||||
|
|
||||||
%h4.media-heading
|
|
||||||
= user.person.name if user.person
|
|
||||||
|
|
||||||
.pull-right.block-admin
|
|
||||||
.unstyled.text-right.actions
|
|
||||||
= link_to t("admins.user_search.view_profile"),
|
|
||||||
person_path(user.person),
|
|
||||||
class: "btn btn-default btn-block block-admin btn-xs"
|
|
||||||
= link_to t("admins.user_search.add_invites"),
|
|
||||||
add_invites_path(user.invitation_code),
|
|
||||||
class: "btn btn-info btn-block block-admin btn-xs"
|
|
||||||
- unless user.person.closed_account
|
|
||||||
= link_to t("admins.user_search.close_account"),
|
|
||||||
admin_close_account_path(user),
|
|
||||||
method: :post, data: {confirm: t("admins.user_search.are_you_sure")},
|
|
||||||
class: "btn btn-danger btn-block block-admin btn-xs"
|
|
||||||
|
|
||||||
- unless user.closed_account?
|
|
||||||
- unless user.access_locked?
|
|
||||||
= link_to t("admins.user_search.lock_account"),
|
|
||||||
admin_lock_account_path(user),
|
|
||||||
method: :post,
|
|
||||||
data: {confirm: t("admins.user_search.are_you_sure_lock_account")},
|
|
||||||
class: "btn btn-danger btn-block block-admin btn-xs"
|
|
||||||
- else
|
|
||||||
= link_to t("admins.user_search.unlock_account"),
|
|
||||||
admin_unlock_account_path(user),
|
|
||||||
method: :post,
|
|
||||||
data: {confirm: t("admins.user_search.are_you_sure_unlock_account")},
|
|
||||||
class: "btn btn-danger btn-block block-admin btn-xs"
|
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-5
|
.col-sm-7
|
||||||
|
%h4.media-heading
|
||||||
|
= user.try(:person).try(:name)
|
||||||
|
.col-sm-5
|
||||||
|
.pull-right
|
||||||
|
%span.label.label-default
|
||||||
|
= t(".id")
|
||||||
|
= user.id
|
||||||
|
%span.label.label-info
|
||||||
|
= t(".guid")
|
||||||
|
= user.try(:person).try(:guid)
|
||||||
|
.row
|
||||||
|
.col-sm-8
|
||||||
%dl.dl-horizontal
|
%dl.dl-horizontal
|
||||||
%dt= t("username")
|
%dt= t("username")
|
||||||
%dd= user.username
|
%dd= user.username
|
||||||
|
|
@ -56,7 +27,7 @@
|
||||||
%dd= user.person.diaspora_handle
|
%dd= user.person.diaspora_handle
|
||||||
%dt= t(".last_seen")
|
%dt= t(".last_seen")
|
||||||
%dd= user.last_seen || t(".unknown")
|
%dd= user.last_seen || t(".unknown")
|
||||||
-if user.invited_by.present?
|
- if user.invited_by.present?
|
||||||
%dt= t(".invite_token")
|
%dt= t(".invite_token")
|
||||||
%dd= invite_code_url(user.invited_by.invitation_code)
|
%dd= invite_code_url(user.invited_by.invitation_code)
|
||||||
%dt= t(".account_closed")
|
%dt= t(".account_closed")
|
||||||
|
|
@ -83,3 +54,30 @@
|
||||||
%dd= user.person.profile.location
|
%dd= user.person.profile.location
|
||||||
%dt= t("people.profile_sidebar.bio")
|
%dt= t("people.profile_sidebar.bio")
|
||||||
%dd= user.person.profile.bio
|
%dd= user.person.profile.bio
|
||||||
|
|
||||||
|
.col-sm-4
|
||||||
|
= link_to t("admins.user_search.view_profile"),
|
||||||
|
person_path(user.person),
|
||||||
|
class: "btn btn-default btn-block"
|
||||||
|
= link_to t("admins.user_search.add_invites"),
|
||||||
|
add_invites_path(user.invitation_code),
|
||||||
|
class: "btn btn-info btn-block"
|
||||||
|
- unless user.person.closed_account
|
||||||
|
= link_to t("admins.user_search.close_account"),
|
||||||
|
admin_close_account_path(user),
|
||||||
|
method: :post, data: {confirm: t("admins.user_search.are_you_sure")},
|
||||||
|
class: "btn btn-danger btn-block"
|
||||||
|
|
||||||
|
- unless user.closed_account?
|
||||||
|
- if user.access_locked?
|
||||||
|
= link_to t("admins.user_search.unlock_account"),
|
||||||
|
admin_unlock_account_path(user),
|
||||||
|
method: :post,
|
||||||
|
data: {confirm: t("admins.user_search.are_you_sure_unlock_account")},
|
||||||
|
class: "btn btn-danger btn-block"
|
||||||
|
- else
|
||||||
|
= link_to t("admins.user_search.lock_account"),
|
||||||
|
admin_lock_account_path(user),
|
||||||
|
method: :post,
|
||||||
|
data: {confirm: t("admins.user_search.are_you_sure_lock_account")},
|
||||||
|
class: "btn btn-danger btn-block"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
- content_for :head do
|
||||||
|
= stylesheet_link_tag :admin
|
||||||
|
|
||||||
.col-md-9
|
.col-md-9
|
||||||
.row
|
.row
|
||||||
.user_search.col-md-12
|
.user_search.col-md-12
|
||||||
|
|
@ -19,13 +22,12 @@
|
||||||
= f.text_field :guid, class: "form-control"
|
= f.text_field :guid, class: "form-control"
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
.col-sm-offset-2.col-sm-10
|
.col-md-offset-2.col-md-8.col-sm-12
|
||||||
= f.label :under13 do
|
= f.label :under13 do
|
||||||
= f.check_box :under13
|
= f.check_box :under13
|
||||||
= t(".under_13")
|
= t(".under_13")
|
||||||
.form-group
|
.col-md-2.col-sm-12
|
||||||
.clearfix.col-sm-12
|
= submit_tag t("admins.stats.go"), class: "btn btn-block btn-primary"
|
||||||
= submit_tag t("admins.stats.go"), class: "btn btn-primary pull-right block-admin"
|
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
|
|
@ -48,10 +50,9 @@
|
||||||
|
|
||||||
= form_tag "admin_inviter", method: :get, class: "form-horizontal" do
|
= form_tag "admin_inviter", method: :get, class: "form-horizontal" do
|
||||||
.form-group
|
.form-group
|
||||||
%label.col-sm-4.control-label
|
%label.col-xs-12.col-md-2.control-label
|
||||||
= t(".email_to")
|
= t(".email_to")
|
||||||
.col-sm-8
|
.col-xs-12.col-md-8
|
||||||
= text_field_tag "identifier", nil, class: "form-control"
|
= text_field_tag "identifier", nil, class: "form-control"
|
||||||
.form-group
|
.col-xs-12.col-md-2
|
||||||
.clearfix.col-md-12
|
= submit_tag t(".invite"), class: "btn btn-block btn-primary"
|
||||||
= submit_tag t(".invite"), class: "btn btn-default pull-right block-admin"
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
|
- content_for :head do
|
||||||
|
= stylesheet_link_tag :admin
|
||||||
|
|
||||||
= render partial: "admins/dashboard"
|
= render partial: "admins/dashboard"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
- content_for :head do
|
||||||
|
= stylesheet_link_tag :admin
|
||||||
|
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-3
|
.col-md-3
|
||||||
|
|
|
||||||
|
|
@ -1 +1,6 @@
|
||||||
|
- flash.each do |name, msg|
|
||||||
|
.expose#flash-container
|
||||||
|
.flash-message{class: "message alert alert-#{flash_class name}", role: "alert"}
|
||||||
|
= msg
|
||||||
|
|
||||||
= render partial: "admins/user_search"
|
= render partial: "admins/user_search"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
|
- content_for :head do
|
||||||
|
= stylesheet_link_tag :admin
|
||||||
|
= stylesheet_link_tag :report
|
||||||
|
|
||||||
.col-md-9
|
.col-md-9
|
||||||
#reports
|
.reports
|
||||||
%h1
|
%h1
|
||||||
= t("report.title")
|
= t("report.title")
|
||||||
- if @reports.size == 0
|
- if @reports.empty?
|
||||||
%p
|
%p
|
||||||
= t("report.unreviewed_reports", count: 0)
|
= t("report.unreviewed_reports", count: 0)
|
||||||
- @reports.each do |report|
|
- @reports.each do |report|
|
||||||
|
|
@ -11,7 +15,7 @@
|
||||||
- username = report.user.username
|
- username = report.user.username
|
||||||
.panel-heading
|
.panel-heading
|
||||||
.reporter.pull-right
|
.reporter.pull-right
|
||||||
= raw t("report.reported_label", person: link_to(username, user_profile_path(username)))
|
!= t("report.reported_label", person: link_to(username, user_profile_path(username)))
|
||||||
.reason
|
.reason
|
||||||
%span.reason-label
|
%span.reason-label
|
||||||
= t("report.reason_label")
|
= t("report.reason_label")
|
||||||
|
|
@ -20,21 +24,21 @@
|
||||||
.panel-body
|
.panel-body
|
||||||
.content
|
.content
|
||||||
= report_content(report)
|
= report_content(report)
|
||||||
|
.segment-selection
|
||||||
= button_to t("report.reported_user_details"),
|
= button_to t("report.reported_user_details"),
|
||||||
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}),
|
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}),
|
||||||
class: "btn pull-left btn-info btn-small", method: :post
|
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :post
|
||||||
= button_to t("report.review_link"), report_path(report.id, type: report.item_type),
|
= button_to t("report.review_link"), report_path(report.id, type: report.item_type),
|
||||||
class: "btn pull-left btn-info btn-small", method: :put
|
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :put
|
||||||
= button_to t("report.delete_link"), report_path(report.id, type: report.item_type),
|
= button_to t("report.delete_link"), report_path(report.id, type: report.item_type),
|
||||||
data: {confirm: t("report.confirm_deletion")},
|
data: {confirm: t("report.confirm_deletion")},
|
||||||
class: "btn pull-right btn-danger btn-small", method: :delete
|
class: "btn pull-right btn-danger btn-small col-md-3 col-xs-12", method: :delete
|
||||||
- else
|
- else
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
- username = report.user.username
|
- username = report.user.username
|
||||||
.panel-heading
|
.panel-heading
|
||||||
.reporter.pull-right
|
.reporter.pull-right
|
||||||
= raw t("report.reported_label", person: link_to(username, user_profile_path(username)))
|
!= t("report.reported_label", person: link_to(username, user_profile_path(username)))
|
||||||
.title
|
.title
|
||||||
= report_content(report)
|
= report_content(report)
|
||||||
.panel-body
|
.panel-body
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
- content_for :head do
|
|
||||||
= stylesheet_link_tag :admin
|
|
||||||
|
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-3
|
.col-md-3
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue