mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
Mod log: add support for sticky/unsticky
This commit is contained in:
@@ -1163,8 +1163,10 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
|
||||
if state:
|
||||
sr.sticky_fullname = thing._fullname
|
||||
ModAction.create(sr, c.user, 'sticky', target=thing)
|
||||
elif not state:
|
||||
sr.sticky_fullname = None
|
||||
ModAction.create(sr, c.user, 'unsticky', target=thing)
|
||||
|
||||
sr._commit()
|
||||
jquery.refresh()
|
||||
|
||||
@@ -57,7 +57,8 @@ class ModAction(tdb_cassandra.UuidThing, Printable):
|
||||
'editsettings', 'editflair', 'distinguish', 'marknsfw',
|
||||
'wikibanned', 'wikicontributor', 'wikiunbanned',
|
||||
'removewikicontributor', 'wikirevise', 'wikipermlevel',
|
||||
'ignorereports', 'unignorereports', 'setpermissions')
|
||||
'ignorereports', 'unignorereports', 'setpermissions', 'sticky',
|
||||
'unsticky')
|
||||
|
||||
_menu = {'banuser': _('ban user'),
|
||||
'unbanuser': _('unban user'),
|
||||
@@ -84,7 +85,10 @@ class ModAction(tdb_cassandra.UuidThing, Printable):
|
||||
'wikipermlevel': _('wiki page permissions'),
|
||||
'ignorereports': _('ignore reports'),
|
||||
'unignorereports': _('unignore reports'),
|
||||
'setpermissions': _('permissions')}
|
||||
'setpermissions': _('permissions'),
|
||||
'sticky': _('sticky post'),
|
||||
'unsticky': _('unsticky post'),
|
||||
}
|
||||
|
||||
_text = {'banuser': _('banned'),
|
||||
'wikibanned': _('wiki banned'),
|
||||
@@ -111,7 +115,10 @@ class ModAction(tdb_cassandra.UuidThing, Printable):
|
||||
'marknsfw': _('marked nsfw'),
|
||||
'ignorereports': _('ignored reports'),
|
||||
'unignorereports': _('unignored reports'),
|
||||
'setpermissions': _('changed permissions on')}
|
||||
'setpermissions': _('changed permissions on'),
|
||||
'sticky': _('stickied'),
|
||||
'unsticky': _('unstickied'),
|
||||
}
|
||||
|
||||
_details_text = {# approve comment/link
|
||||
'unspam': _('unspam'),
|
||||
|
||||
@@ -6345,7 +6345,9 @@ body:not(.gold) .allminus-link {
|
||||
.modactions.wikicontributor,
|
||||
.modactions.removewikicontributor,
|
||||
.modactions.ignorereports,
|
||||
.modactions.unignorereports {
|
||||
.modactions.unignorereports,
|
||||
.modactions.sticky,
|
||||
.modactions.unsticky {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: block;
|
||||
@@ -6422,6 +6424,12 @@ body:not(.gold) .allminus-link {
|
||||
.modactions.unignorereports {
|
||||
background-image: url(../modactions_unmute.png); /* SPRITE */
|
||||
}
|
||||
.modactions.sticky {
|
||||
background-image: url(../modactions_sticky.png); /* SPRITE */
|
||||
}
|
||||
.modactions.unsticky {
|
||||
background-image: url(../modactions_unsticky.png); /* SPRITE */
|
||||
}
|
||||
|
||||
.adminpasswordform {
|
||||
display: block;
|
||||
|
||||
BIN
r2/r2/public/static/modactions_sticky.png
Normal file
BIN
r2/r2/public/static/modactions_sticky.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 594 B |
BIN
r2/r2/public/static/modactions_unsticky.png
Normal file
BIN
r2/r2/public/static/modactions_unsticky.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 598 B |
Reference in New Issue
Block a user