diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 6142cafb24..2065149840 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -244,6 +244,7 @@ define(['uploader'], function(uploader) { '
' + '' + '' + + '' + '
' + '' + ' ' + resultObj.username; @@ -331,12 +332,15 @@ define(['uploader'], function(uploader) { Categories.refreshPrivilegeList = function (cid) { var modalEl = $('#category-permissions-modal'), readMembers = modalEl.find('#category-permissions-read'), - writeMembers = modalEl.find('#category-permissions-write'); + writeMembers = modalEl.find('#category-permissions-write'), + moderatorsEl = modalEl.find('#category-permissions-mods'); socket.emit('admin.categories.getPrivilegeSettings', cid, function(err, privilegeList) { var readLength = privilegeList['+r'].length, writeLength = privilegeList['+w'].length, + modLength = privilegeList['mods'].length, readFrag = document.createDocumentFragment(), writeFrag = document.createDocumentFragment(), + modFrag = document.createDocumentFragment(), liEl = document.createElement('li'), x, userObj; @@ -350,7 +354,7 @@ define(['uploader'], function(uploader) { } } else { liEl.className = 'empty'; - liEl.innerHTML = 'No users are in this list'; + liEl.innerHTML = 'All users can read and see this category'; readFrag.appendChild(liEl.cloneNode(true)); } @@ -364,12 +368,27 @@ define(['uploader'], function(uploader) { } } else { liEl.className = 'empty'; - liEl.innerHTML = 'No users are in this list'; + liEl.innerHTML = 'All users can write to this category'; writeFrag.appendChild(liEl.cloneNode(true)); } + if (modLength > 0) { + for(x=0;x'; + modFrag.appendChild(liEl.cloneNode(true)); + } + } else { + liEl.className = 'empty'; + liEl.innerHTML = 'No moderators'; + modFrag.appendChild(liEl.cloneNode(true)); + } + readMembers.html(readFrag); writeMembers.html(writeFrag); + moderatorsEl.html(modFrag); }); }; diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl index 5fc50d0236..8b2105cedc 100644 --- a/public/templates/admin/categories.tpl +++ b/public/templates/admin/categories.tpl @@ -158,7 +158,7 @@ -