diff --git a/public/css/admin.less b/public/css/admin.less index c56eeb74ce..9cb477f08e 100644 --- a/public/css/admin.less +++ b/public/css/admin.less @@ -85,6 +85,10 @@ &:hover { background-color: rgba(128, 128, 128, 0.2); } + + &.no-themes { + font-style: italic; + } } } diff --git a/public/src/forum/admin/themes.js b/public/src/forum/admin/themes.js index 9328c85678..762924cd4f 100644 --- a/public/src/forum/admin/themes.js +++ b/public/src/forum/admin/themes.js @@ -86,23 +86,30 @@ var nodebb_admin = (function(nodebb_admin) { themeFrag = document.createDocumentFragment(), liEl = document.createElement('li'); - for(var x=0,numThemes=themes.length;x' + - '
' + - '
' + - ' ' + - '' + + if (themes.length > 0) { + for(var x=0,numThemes=themes.length;x' + + '
' + + '
' + + ' ' + + '' + + '
' + + '

' + themes[x].name + '

' + + '

' + + themes[x].description + + (themes[x].url ? ' (Homepage)' : '') + + '

' + '
' + - '

' + themes[x].name + '

' + - '

' + - themes[x].description + - (themes[x].url ? ' (Homepage)' : '') + - '

' + - '
' + - '
'; - themeFrag.appendChild(liEl.cloneNode(true)); + '
'; + themeFrag.appendChild(liEl.cloneNode(true)); + } + } else { + // No themes found + liEl.className = 'no-themes'; + liEl.innerHTML = 'No installed themes found'; + themeFrag.appendChild(liEl); } instListEl.innerHTML = '';