-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
326 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,131 +1,90 @@ | ||
%li.user.media | ||
.media-left | ||
- if user.person | ||
.media-object | ||
= person_image_tag(user.person, size: :thumb_small) | ||
.media-object | ||
= person_image_tag(person, size: :thumb_small) | ||
.media-body | ||
.row | ||
.col-sm-7 | ||
%h4.media-heading | ||
= user.try(:person).try(:name) | ||
= person.diaspora_handle | ||
= t(".remote") if person.remote? | ||
= t(".local") if person.local? | ||
%br | ||
- if person.closed_account? | ||
.label.label-danger | ||
= t(".closed_account") | ||
- elsif person.locked_access? | ||
.label.label-warning | ||
= t(".locked_account") | ||
- if !person.closed_account? && !person.locked_access? | ||
.label.label-success | ||
= t(".active_account") | ||
.col-sm-5 | ||
.pull-right | ||
%span.label.label-default | ||
= t(".id") | ||
= user.id | ||
= person.id | ||
%span.label.label-info | ||
= t(".guid") | ||
= user.try(:person).try(:guid) | ||
= person.guid | ||
.row | ||
.col-sm-8 | ||
%dl.dl-horizontal | ||
%dt= t("username") | ||
%dd= user.username | ||
%dt= t(".email") | ||
%dd= user.email | ||
%dt= t(".diaspora_handle") | ||
%dd= user.person.diaspora_handle | ||
%dt= t(".last_seen") | ||
%dd= user.last_seen || t(".unknown") | ||
%dt= t(".current_sign_in_ip") | ||
%dd= user.current_sign_in_ip || t(".unknown") | ||
- if user.invited_by.present? | ||
%dt= t(".invite_token") | ||
%dd= invite_code_url(user.invited_by.invitation_code) | ||
%dt= t(".account_closed") | ||
%dd | ||
- if user.person.closed_account | ||
%span.label.label-warning= t(".yes") | ||
- else | ||
%span.label.label-success= t(".no") | ||
%dd= person.username | ||
- if person.owner.present? | ||
%dt= t(".email") | ||
%dd= person.owner.email | ||
%dt= t(".first_seen") | ||
%dd= person.owner.created_at || t(".unknown") | ||
%dt= t(".last_seen") | ||
%dd= person.owner.last_seen || t(".unknown") | ||
%dt= t(".current_sign_in_ip") | ||
%dd= person.owner.current_sign_in_ip || t(".unknown") | ||
- if person.owner.invited_by.present? | ||
%dt= t(".invite_token") | ||
%dd= invite_code_url(person.owner.invited_by.invitation_code) | ||
%dt= t(".nsfw") | ||
%dd | ||
- if user.person.profile.nsfw | ||
- if person.profile.nsfw | ||
%span.label.label-warning= t(".yes") | ||
- else | ||
%span.label.label-success= t(".no") | ||
%dt= t(".admin") | ||
%dd | ||
- if user.admin? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".moderator") | ||
%dd | ||
- if user.moderator_only? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".spotlight") | ||
%dd | ||
- if user.spotlight? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
|
||
- if person.owner.present? | ||
%dt= t(".admin") | ||
%dd | ||
- if person.owner.admin? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".moderator") | ||
%dd | ||
- if person.owner.moderator? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".spotlight") | ||
%dd | ||
- if person.owner.spotlight? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%h4= t("layouts.header.profile") | ||
|
||
%dl.dl-horizontal | ||
%dt= t("people.profile_sidebar.born") | ||
%dd= user.person.profile.birthday | ||
%dd= person.profile.birthday | ||
%dt= t("people.profile_sidebar.gender") | ||
%dd= user.person.profile.gender | ||
%dd= person.profile.gender | ||
%dt= t("people.profile_sidebar.location") | ||
%dd= user.person.profile.location | ||
%dd= person.profile.location | ||
%dt= t("people.profile_sidebar.bio") | ||
%dd= user.person.profile.bio | ||
%dd= 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" | ||
- 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" | ||
- if Role.is_admin?(user.person) | ||
= link_to t("admins.user_search.remove_admin"), | ||
admin_remove_admin_path(user), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_admin"), | ||
admin_make_admin_path(user), | ||
method: :post, | ||
class: "btn btn-info btn-block" | ||
- if Role.moderator_only?(user.person) | ||
= link_to t("admins.user_search.remove_moderator"), | ||
admin_remove_moderator_path(user), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_moderator"), | ||
admin_make_moderator_path(user), | ||
method: :post, | ||
class: "btn btn-info btn-block" | ||
- if Role.spotlight?(user.person) | ||
= link_to t("admins.user_search.remove_spotlight"), | ||
admin_remove_spotlight_path(user), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_spotlight"), | ||
admin_make_spotlight_path(user), | ||
method: :post, | ||
class: "btn btn-info btn-block" | ||
= render partial: "admins/user_entry/view_profile", locals: {person: person} | ||
= render partial: "admins/user_entry/add_invites", locals: {person: person} | ||
= render partial: "admins/user_entry/lock_action", locals: {person: person} | ||
= render partial: "admins/user_entry/close_action", locals: {person: person} | ||
= render partial: "admins/user_entry/admin_action", locals: {person: person} | ||
= render partial: "admins/user_entry/moderator_action", locals: {person: person} | ||
= render partial: "admins/user_entry/spotlight_action", locals: {person: person} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- if person.owner.present? && !person.closed_account? | ||
= link_to t("admins.user_search.add_invites"), | ||
add_invites_path(person.user_id), | ||
class: "btn btn-info btn-block" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- if person.owner.present? && person != @current_user.person && !person.closed_account? | ||
- if Role.is_admin?(person) | ||
= link_to t("admins.user_search.remove_admin"), | ||
admin_remove_admin_path(person.user_id), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_admin"), | ||
admin_make_admin_path(person.user_id), | ||
method: :post, | ||
class: "btn btn-info btn-block" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- if person != @current_user.person && !person.closed_account? | ||
= link_to person.owner.present? ? t("admins.user_search.close_account") : t("admins.user_search.close_local_account"), | ||
admin_close_account_path(person.id), | ||
method: :post, data: {confirm: t("admins.user_search.are_you_sure")}, | ||
class: "btn btn-danger btn-block" | ||
= link_to person.owner.present? ? t("admins.user_search.wipe_and_close_account") : t("admins.user_search.wipe_and_close_local_account"), | ||
admin_wipe_and_close_account_path(person.id), | ||
method: :post, data: {confirm: t("admins.user_search.are_you_sure_close_and_wipe_account")}, | ||
class: "btn btn-danger btn-block" |
Oops, something went wrong.