Change Log Buttons
* Dark theme fixes to brighten notification colors on mobile * Add change log buttons around various pages to easily look into the history of an object in the database: * User profile page ('about user' and user table history links) * User friends page * User/Site gallery page (history of all (user) photos) * Admin insights page (comments, threads, and blocklist history) * Admin certification page (history of a user's cert photos) * Comment history buttons on forums and photos
This commit is contained in:
parent
4ff7bc5d04
commit
ddd33aad91
|
@ -23,8 +23,17 @@
|
||||||
|
|
||||||
.nonshy-navbar-notification-tag.is-warning {
|
.nonshy-navbar-notification-tag.is-warning {
|
||||||
background-color: rgb(248, 223, 98) !important;
|
background-color: rgb(248, 223, 98) !important;
|
||||||
|
color: rgb(26, 0, 5) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* force lit-up notification buttons (on the mobile top nav, e.g. new Messages/Friends)
|
||||||
|
to show as a bright bulma is-warning style (.tag.is-warning) */
|
||||||
|
.nonshy-navbar-notification {
|
||||||
|
background-color: rgb(248, 223, 98) !important;
|
||||||
|
color: rgb(26, 0, 5) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.has-text-dark {
|
.has-text-dark {
|
||||||
/* note: this css file otherwise didn't override this, dark's always dark, brighten it! */
|
/* note: this css file otherwise didn't override this, dark's always dark, brighten it! */
|
||||||
color: #b5b5b5 !important;
|
color: #b5b5b5 !important;
|
||||||
|
|
|
@ -69,6 +69,14 @@
|
||||||
<div class="block">
|
<div class="block">
|
||||||
Found {{.Pager.Total}} friend{{Pluralize64 .Pager.Total}}
|
Found {{.Pager.Total}} friend{{Pluralize64 .Pager.Total}}
|
||||||
(page {{.Pager.Page}} of {{.Pager.Pages}}).
|
(page {{.Pager.Page}} of {{.Pager.Pages}}).
|
||||||
|
|
||||||
|
<!-- Admin links -->
|
||||||
|
{{if .CurrentUser.IsAdmin}}
|
||||||
|
<a href="/admin/changelog?table_name=friends&about_user_id={{.User.ID}}" class="button is-small has-text-warning ml-2">
|
||||||
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
||||||
|
<span>Change Log</span>
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
|
|
|
@ -542,43 +542,60 @@
|
||||||
<header class="card-header has-background-danger">
|
<header class="card-header has-background-danger">
|
||||||
<p class="card-header-title has-text-light">
|
<p class="card-header-title has-text-light">
|
||||||
<i class="fa fa-peace pr-2"></i>
|
<i class="fa fa-peace pr-2"></i>
|
||||||
Admin Actions
|
Admin
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<ul class="menu-list">
|
<aside class="menu">
|
||||||
<li>
|
<ul class="menu-list">
|
||||||
<a href="/admin/user-action?intent=insights&user_id={{.User.ID}}">
|
<p class="menu-label">Profile Information</p>
|
||||||
<span class="icon"><i class="fa fa-search"></i></span>
|
<li>
|
||||||
<span>Admin insights <small>(block lists, etc.)</small></span>
|
<a href="/admin/user-action?intent=insights&user_id={{.User.ID}}">
|
||||||
</a>
|
<span class="icon"><i class="fa fa-search"></i></span>
|
||||||
</li>
|
<span>Admin insights <small>(block lists, etc.)</small></span>
|
||||||
<li>
|
</a>
|
||||||
<a href="/admin/user-action?intent=impersonate&user_id={{.User.ID}}">
|
</li>
|
||||||
<span class="icon"><i class="fa fa-ghost"></i></span>
|
<li>
|
||||||
<span>Impersonate this user</span>
|
<a href="/admin/changelog?about_user_id={{.User.ID}}">
|
||||||
</a>
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
</li>
|
<span>Change logs about this user</span>
|
||||||
<li>
|
</a>
|
||||||
<a href="/admin/user-action?intent=ban&user_id={{.User.ID}}">
|
</li>
|
||||||
<span class="icon"><i class="fa fa-ban"></i></span>
|
<li>
|
||||||
<span>Ban/unban this user</span>
|
<a href="/admin/changelog?table_name=users&table_id={{.User.ID}}">
|
||||||
</a>
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
</li>
|
<span>User account history</span>
|
||||||
<li>
|
</a>
|
||||||
<a href="/admin/user-action?intent=promote&user_id={{.User.ID}}">
|
</li>
|
||||||
<span class="icon"><i class="fa fa-peace"></i></span>
|
|
||||||
<span>Add/Remove admin rights</span>
|
<p class="menu-label">Admin Actions</p>
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/admin/user-action?intent=impersonate&user_id={{.User.ID}}">
|
||||||
<li>
|
<span class="icon"><i class="fa fa-ghost"></i></span>
|
||||||
<a href="/admin/user-action?intent=delete&user_id={{.User.ID}}">
|
<span>Impersonate this user</span>
|
||||||
<span class="icon"><i class="fa fa-trash"></i></span>
|
</a>
|
||||||
<span>Delete user account</span>
|
</li>
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/admin/user-action?intent=ban&user_id={{.User.ID}}">
|
||||||
</ul>
|
<span class="icon"><i class="fa fa-ban"></i></span>
|
||||||
|
<span>Ban/unban this user</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/user-action?intent=promote&user_id={{.User.ID}}">
|
||||||
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
||||||
|
<span>Add/Remove admin rights</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/user-action?intent=delete&user_id={{.User.ID}}">
|
||||||
|
<span class="icon"><i class="fa fa-trash"></i></span>
|
||||||
|
<span>Delete user account</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
<!-- Friendship badge -->
|
<!-- Friendship badge -->
|
||||||
{{if $Root.FriendMap.Get .ID}}
|
{{if $Root.FriendMap.Get .ID}}
|
||||||
<div class="has-text-centered">
|
<div class="has-text-centered">
|
||||||
<span class="is-size-7 has-text-warning-dark">
|
<span class="is-size-7 has-text-warning">
|
||||||
<i class="fa fa-user-group" title="Friends"></i>
|
<i class="fa fa-user-group" title="Friends"></i>
|
||||||
Friends
|
Friends
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -158,6 +158,13 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<a href="/admin/changelog?table_name=certification_photos&about_user_id={{$User.ID}}" class="button is-small has-text-warning">
|
||||||
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
|
<span>Change Log</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer class="card-footer">
|
<footer class="card-footer">
|
||||||
{{if not (eq .Status "rejected")}}
|
{{if not (eq .Status "rejected")}}
|
||||||
|
|
|
@ -20,17 +20,20 @@
|
||||||
<header class="card-header has-background-link">
|
<header class="card-header has-background-link">
|
||||||
<p class="card-header-title has-text-light">
|
<p class="card-header-title has-text-light">
|
||||||
{{if eq .Intent "impersonate"}}
|
{{if eq .Intent "impersonate"}}
|
||||||
<span class="icon"><i class="fa fa-ghost"></i></span>
|
<i class="mr-2 fa fa-ghost"></i>
|
||||||
Impersonate User
|
Impersonate User
|
||||||
{{else if eq .Intent "ban"}}
|
{{else if eq .Intent "ban"}}
|
||||||
<span class="icon"><i class="fa fa-ban"></i></span>
|
<i class="mr-2 fa fa-ban"></i>
|
||||||
Ban User
|
Ban User
|
||||||
{{else if eq .Intent "promote"}}
|
{{else if eq .Intent "promote"}}
|
||||||
<span class="icon"><i class="fa fa-peace"></i></span>
|
<i class="mr-2 fa fa-peace"></i>
|
||||||
Promote User
|
Promote User
|
||||||
{{else if eq .Intent "delete"}}
|
{{else if eq .Intent "delete"}}
|
||||||
<span class="icon"><i class="fa fa-trash"></i></span>
|
<i class="mr-2 fa fa-trash"></i>
|
||||||
Delete User
|
Delete User
|
||||||
|
{{else if eq .Intent "insights"}}
|
||||||
|
<i class="mr-2 fa fa-search"></i>
|
||||||
|
Admin Insights
|
||||||
{{end}}
|
{{end}}
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
@ -66,6 +69,28 @@
|
||||||
creeping a lot of people out and ending up on a lot of block lists.
|
creeping a lot of people out and ending up on a lot of block lists.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h3>Social Change Log</h3>
|
||||||
|
|
||||||
|
<p class="is-size-7">
|
||||||
|
These links go into the admin Change Log viewer to show history of the user's
|
||||||
|
interactions with parts of the website. Also look for "Change Log" buttons scattered
|
||||||
|
around various pages (profile, gallery, certification photo view) for history
|
||||||
|
about the user's data tables.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/changelog?table_name=comments&table_id={{.User.ID}}">
|
||||||
|
Comments written
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin/changelog?table_name=threads&table_id={{.User.ID}}">
|
||||||
|
Forum threads started
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h3>Block Lists</h3>
|
<h3>Block Lists</h3>
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -76,6 +101,13 @@
|
||||||
(Users who {{.User.Username}} is blocking)
|
(Users who {{.User.Username}} is blocking)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="/admin/changelog?table_name=blocks&about_user_id={{.User.ID}}" class="button is-small">
|
||||||
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
|
<span>Change Log</span>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{range .BlocklistInsights.Blocks}}
|
{{range .BlocklistInsights.Blocks}}
|
||||||
<li>
|
<li>
|
||||||
|
@ -92,6 +124,13 @@
|
||||||
(Users who block {{.User.Username}})
|
(Users who block {{.User.Username}})
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="/admin/changelog?table_name=blocks&table_id={{.User.ID}}" class="button is-small">
|
||||||
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
|
<span>Change Log</span>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{range .BlocklistInsights.BlockedBy}}
|
{{range .BlocklistInsights.BlockedBy}}
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -276,7 +276,7 @@
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<a class="tag {{if gt .NavFriendRequests 0}}is-warning{{else}}is-grey{{end}} py-4"
|
<a class="tag {{if gt .NavFriendRequests 0}}is-warning nonshy-navbar-notification{{else}}is-grey{{end}} py-4"
|
||||||
href="/friends{{if gt .NavFriendRequests 0}}?view=requests{{end}}">
|
href="/friends{{if gt .NavFriendRequests 0}}?view=requests{{end}}">
|
||||||
<span class="icon"><i class="fa fa-user-group"></i></span>
|
<span class="icon"><i class="fa fa-user-group"></i></span>
|
||||||
{{if gt .NavFriendRequests 0}}
|
{{if gt .NavFriendRequests 0}}
|
||||||
|
@ -284,8 +284,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a class="tag {{if gt .NavUnreadMessages 0}}is-warning nonshy-navbar-notification{{else}}is-grey{{end}} py-4" href="/messages">
|
||||||
<a class="tag {{if gt .NavUnreadMessages 0}}is-warning{{else}}is-grey{{end}} py-4" href="/messages">
|
|
||||||
<span class="icon"><i class="fa fa-envelope"></i></span>
|
<span class="icon"><i class="fa fa-envelope"></i></span>
|
||||||
{{if gt .NavUnreadMessages 0}}
|
{{if gt .NavUnreadMessages 0}}
|
||||||
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavUnreadMessages}}</small>
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavUnreadMessages}}</small>
|
||||||
|
@ -293,7 +292,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{if gt .NavUnreadNotifications 0}}
|
{{if gt .NavUnreadNotifications 0}}
|
||||||
<a class="tag is-warning py-4" href="/me#notifications">
|
<a class="tag is-warning nonshy-navbar-notification py-4" href="/me#notifications">
|
||||||
<span class="icon"><i class="fa fa-bell"></i></span>
|
<span class="icon"><i class="fa fa-bell"></i></span>
|
||||||
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavUnreadNotifications}}</small>
|
<small class="nonshy-navbar-notification-count">{{FormatNumberShort .NavUnreadNotifications}}</small>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
{{$Root := .}}
|
{{$Root := .}}
|
||||||
<div class="block p-2">
|
<div class="block p-2">
|
||||||
{{range $i, $c := .Comments}}
|
{{range $i, $c := .Comments}}
|
||||||
<div class="box has-background-link-light has-text-dark" id="p{{.ID}}">
|
<div class="box has-text-dark" id="p{{.ID}}">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-2 has-text-centered">
|
<div class="column is-2 has-text-centered">
|
||||||
<div>
|
<div>
|
||||||
|
@ -306,6 +306,16 @@
|
||||||
<span>Link</span>
|
<span>Link</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Admin: history -->
|
||||||
|
{{if $Root.CurrentUser.IsAdmin}}
|
||||||
|
<div class="column is-narrow">
|
||||||
|
<a href="/admin/changelog?table_name=comments&table_id={{.ID}}" class="has-text-warning">
|
||||||
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
|
<span>Change log</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if $Root.CurrentUser.IsAdmin}}
|
{{if $Root.CurrentUser.IsAdmin}}
|
||||||
|
|
|
@ -767,6 +767,16 @@
|
||||||
|
|
||||||
{{SimplePager .Pager}}
|
{{SimplePager .Pager}}
|
||||||
|
|
||||||
|
<!-- Admin change log link -->
|
||||||
|
{{if .CurrentUser.IsAdmin}}
|
||||||
|
<div class="block">
|
||||||
|
<a href="/admin/changelog?table_name=photos{{if .User}}&about_user_id={{.User.ID}}{{end}}" class="button is-small has-text-warning">
|
||||||
|
<span class="icon"><i class="fa fa-peace mr-1"></i></span>
|
||||||
|
<span>{{if .User}}User{{else}}Site{{end}} Gallery change log</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<!-- Inner circle invite notice -->
|
<!-- Inner circle invite notice -->
|
||||||
{{if .InnerCircleInviteView}}
|
{{if .InnerCircleInviteView}}
|
||||||
<div class="notification is-info is-light content">
|
<div class="notification is-info is-light content">
|
||||||
|
|
|
@ -98,9 +98,14 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
<!-- Timestamp -->
|
||||||
|
<div>
|
||||||
|
<small class="has-text-grey">Uploaded {{.Photo.CreatedAt.Format "Jan _2 2006 15:04:05"}}</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Quick mark photo as explicit -->
|
<!-- Quick mark photo as explicit -->
|
||||||
{{if and (not .Photo.Explicit) (ne .Photo.UserID .CurrentUser.ID)}}
|
{{if and (not .Photo.Explicit) (ne .Photo.UserID .CurrentUser.ID)}}
|
||||||
<div class="mt-2">
|
<div class="mt-1">
|
||||||
<a href="#"
|
<a href="#"
|
||||||
class="has-text-danger is-size-7 nonshy-mark-explicit"
|
class="has-text-danger is-size-7 nonshy-mark-explicit"
|
||||||
data-photo-id="{{.Photo.ID}}" data-photo-url="{{PhotoURL .Photo.Filename}}">
|
data-photo-id="{{.Photo.ID}}" data-photo-url="{{PhotoURL .Photo.Filename}}">
|
||||||
|
@ -114,7 +119,7 @@
|
||||||
{{template "like-example" .}}
|
{{template "like-example" .}}
|
||||||
|
|
||||||
<!-- Like & Comments buttons -->
|
<!-- Like & Comments buttons -->
|
||||||
<div class="mt-4 mb-2 columns is-centered is-mobile is-gapless">
|
<div class="mt-4 mb-0 columns is-centered is-mobile is-gapless">
|
||||||
<div class="column is-narrow mr-2">
|
<div class="column is-narrow mr-2">
|
||||||
{{$Like := .LikeMap.Get .Photo.ID}}
|
{{$Like := .LikeMap.Get .Photo.ID}}
|
||||||
<button type="button" class="button is-small nonshy-like-button"
|
<button type="button" class="button is-small nonshy-like-button"
|
||||||
|
@ -138,7 +143,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Photo controls buttons (edit/delete/report) -->
|
<!-- Photo controls buttons (edit/delete/report) -->
|
||||||
<div class="my-0 columns is-centered is-mobile is-gapless">
|
<div class="my-2 columns is-centered is-mobile is-gapless">
|
||||||
<!-- Owned photo: have edit/delete buttons too -->
|
<!-- Owned photo: have edit/delete buttons too -->
|
||||||
{{if or .IsOwnPhoto .CurrentUser.IsAdmin}}
|
{{if or .IsOwnPhoto .CurrentUser.IsAdmin}}
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
|
@ -165,6 +170,18 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Admin links -->
|
||||||
|
{{if .CurrentUser.IsAdmin}}
|
||||||
|
<div class="columns is-centered is-mobile is-gapless">
|
||||||
|
<div class="column is-narrow">
|
||||||
|
<a href="/admin/changelog?table_name=photos&table_id={{.Photo.ID}}" class="button is-small has-text-warning">
|
||||||
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
||||||
|
<span>Change Log</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><!-- /photo card -->
|
</div><!-- /photo card -->
|
||||||
|
@ -322,6 +339,16 @@
|
||||||
<span>Link</span>
|
<span>Link</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Admin: history -->
|
||||||
|
{{if $Root.CurrentUser.IsAdmin}}
|
||||||
|
<div class="column is-narrow">
|
||||||
|
<a href="/admin/changelog?table_name=comments&table_id={{.ID}}" class="has-text-warning">
|
||||||
|
<span class="icon"><i class="fa fa-clipboard-list"></i></span>
|
||||||
|
<span>Change log</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user