From c98331de820dbe8a86d374f85af63b189e4c79e9 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 29 Dec 2014 15:52:00 -0500 Subject: [PATCH] revamping categories management page in ACP, #2463 --- public/less/admin/admin.less | 1 - public/less/admin/manage/categories.less | 133 ------------- public/src/admin/manage/categories.js | 4 - src/controllers/admin.js | 25 +-- src/routes/admin.js | 4 +- src/views/admin/manage/categories.tpl | 201 ++++++++------------ src/views/admin/partials/categories/row.tpl | 16 ++ 7 files changed, 101 insertions(+), 283 deletions(-) delete mode 100644 public/less/admin/manage/categories.less create mode 100644 src/views/admin/partials/categories/row.tpl diff --git a/public/less/admin/admin.less b/public/less/admin/admin.less index d1626805ce..b7bebd8f98 100644 --- a/public/less/admin/admin.less +++ b/public/less/admin/admin.less @@ -2,7 +2,6 @@ @import "./mixins"; @import "./general/dashboard"; -@import "./manage/categories"; @import "./manage/groups"; @import "./manage/tags"; @import "./manage/flags"; diff --git a/public/less/admin/manage/categories.less b/public/less/admin/manage/categories.less deleted file mode 100644 index 5982a108dd..0000000000 --- a/public/less/admin/manage/categories.less +++ /dev/null @@ -1,133 +0,0 @@ -.categories { - .entry-row { - border-radius: 10px; - cursor: move; - list-style-type: none; - } - - .fa-icons .col-md-3 { - padding-left: 0; - padding-right: 0; - } - - .admin-categories { - margin-top: 20px; - - > ul > li { - - label { - font-size: 12px; - font-weight: none; - } - - form { - .btn-group { - display: block; - } - } - h3 { - margin-top: 0; - } - - h3, h4 { - cursor: text; - .fa-edit { - cursor: pointer; - } - } - - h3, h4, .toggle-settings { - padding-left: 8px; - } - - .preview-box { - width: 100%; - height: 100px; - text-align: center; - color: white; - margin-top: 0; - - .icon { - width: 30px; - height: 30px; - line-height: 40px; - display: inline-block; - margin: 35px 5px 0 5px; - } - } - - .dropdown { - hr { - margin: 5px auto; - } - } - } - } - - .permissions-modal { - .search-results { - padding: 0; - - > li { - .zebra; - clear: both; - list-style-type: none; - padding: 0.5em; - min-height: 46px; - - a { - &:before { - font-family: "FontAwesome"; - content: "\f096"; - display: inline-block; - min-width: 20px; - } - - &.active:before { - content: "\f046"; - } - } - - img { - width: 32px; - margin-right: 1em; - } - } - } - - .members { - li { - list-style-type: none; - .inline-block; - .pointer; - - img { - width: 32px; - } - - &.empty { - font-size: 12px; - cursor: auto; - min-height: 28px; - } - } - } - } - - .category-list { - padding: 0; - - li { - .inline-block; - .pointer; - padding: 0.5em; - margin: 0.25em; - .border-radius(3px); - - &.disabled { - -webkit-filter: grayscale(30%); - .opacity(0.5); - } - } - } -} \ No newline at end of file diff --git a/public/src/admin/manage/categories.js b/public/src/admin/manage/categories.js index 5bf1bfe945..8968549b91 100644 --- a/public/src/admin/manage/categories.js +++ b/public/src/admin/manage/categories.js @@ -40,10 +40,6 @@ define('admin/manage/categories', [ return false; } - function update_blockclass(el) { - el.parentNode.parentNode.className = 'entry-row ' + el.value; - } - function updateCategoryOrders() { var categories = $('.admin-categories #entry-container').children(); for(var i = 0; i +
Categories
- - -
-
    - -
  • -
    -
    -
    - -
    -
    -
    - -
    -
    -

    {categories.name}

    - -

    {categories.description}

    - - -
    -
    -
    - - -
    - - -
    - - - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -
    -
    -
    -
    -
  • - -
-
+
+ + + + + + + + + + + + + + + + + + + + + +
NameDescriptionTopicsPosts
+ + + + {active.name}{active.description}{active.topic_count}{active.post_count}
+
@@ -141,6 +49,47 @@
+ +
+
+
Categories
+
+
+ + + + + + + + + + + + + + + + + + + + + +
NameDescriptionTopicsPosts
+ + + + {disabled.name}{disabled.description}{disabled.topic_count}{disabled.post_count}
+
+
+
+
diff --git a/src/views/admin/partials/categories/row.tpl b/src/views/admin/partials/categories/row.tpl new file mode 100644 index 0000000000..0e4c15909b --- /dev/null +++ b/src/views/admin/partials/categories/row.tpl @@ -0,0 +1,16 @@ + + + + + + + {name} + {description} + {topic_count} + {post_count} + \ No newline at end of file