mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
small style changes in header, added edit and delete button for moderators/own posts, hide moderator tools for all users except those that qualify
This commit is contained in:
@@ -23,11 +23,12 @@ body {
|
||||
background: #fdfdfd;
|
||||
}
|
||||
|
||||
.none {
|
||||
// havent really decided what makes more sense tbh
|
||||
.none, .hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.block {
|
||||
.block, .show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -207,15 +208,16 @@ footer.footer {
|
||||
|
||||
#user_label {
|
||||
img {
|
||||
border: 1px solid #999;
|
||||
border: 1px solid #454;
|
||||
margin-right: 8px;
|
||||
margin-top: -2px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ded;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
<div class="profile-block">
|
||||
<img class="hidden-desktop" src="{posts.gravatar}10" align="left" /> posted by <strong>{posts.username}</strong> {posts.relativeTime}
|
||||
<span class="post-buttons">
|
||||
<div id="quote_{posts.pid}" class="quote hidden-phone"><i class="icon-quote-left"></i></div>
|
||||
<div id="ids_{posts.pid}_{posts.uid}" class="edit {posts.display_moderator_tools} hidden-phone"><i class="icon-pencil"></i></div>
|
||||
<div id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone"><i class="icon-trash"></i></div>
|
||||
<div id="quote_{posts.pid}_{posts.uid}" class="quote hidden-phone"><i class="icon-quote-left"></i></div>
|
||||
<div id="favs_{posts.pid}_{posts.uid}" class="favourite hidden-phone"><span id="post_rep_{posts.pid}">{posts.post_rep}</span><i class="{posts.fav_star_class}"></i></div>
|
||||
<div class="post_reply">Reply <i class="icon-reply"></i></div>
|
||||
</span>
|
||||
@@ -51,6 +53,12 @@ jQuery('.quote').click(function() {
|
||||
document.getElementById('post_content').innerHTML = '> ' + document.getElementById('content_' + this.id.replace('quote_', '')).innerHTML;
|
||||
});
|
||||
|
||||
jQuery('.edit, .delete').each(function() {
|
||||
var ids = this.id.replace('ids_', '').split('_'),
|
||||
pid = ids[0],
|
||||
uid = ids[1];
|
||||
|
||||
});
|
||||
|
||||
|
||||
ajaxify.register_events(['event:rep_up', 'event:rep_down']);
|
||||
|
||||
@@ -15,7 +15,6 @@ var RDB = require('./redis.js'),
|
||||
|
||||
|
||||
Posts.get = function(callback, tid, current_user, start, end) {
|
||||
console.log(current_user);
|
||||
if (start == null) start = 0;
|
||||
if (end == null) end = start + 10;
|
||||
|
||||
@@ -65,7 +64,8 @@ var RDB = require('./redis.js'),
|
||||
'gravatar' : gravatars[i],
|
||||
'timestamp' : timestamp[i],
|
||||
'relativeTime': utils.relativeTime(timestamp[i]),
|
||||
'fav_star_class' : hasFavourited ? 'icon-star' : 'icon-star-empty'
|
||||
'fav_star_class' : hasFavourited ? 'icon-star' : 'icon-star-empty',
|
||||
'display_moderator_tools' : uid[i] === current_user ? 'show' : 'hide'
|
||||
});
|
||||
|
||||
callbacks--;
|
||||
|
||||
Reference in New Issue
Block a user