From 4f51bd953f51804d2a89c788c93a03cb20ab9c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Tue, 23 Aug 2016 14:58:34 +0200 Subject: [PATCH] Fix error: show add tag form if project has no ntags --- .../includes/modules/admin/project-tags.jade | 20 ++++++++++++------- app/styles/layout/admin-project-tags.scss | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/partials/includes/modules/admin/project-tags.jade b/app/partials/includes/modules/admin/project-tags.jade index 758925b2..485e6326 100644 --- a/app/partials/includes/modules/admin/project-tags.jade +++ b/app/partials/includes/modules/admin/project-tags.jade @@ -1,13 +1,10 @@ section .admin-tags-section-wrapper-empty( - ng-show="!projectTagsAll.length" + ng-if="!projectTagsAll.length && ctrl.loading" tg-loading="ctrl.loading" ) - p(translate="ADMIN.PROJECT_VALUES_TAGS.EMPTY") - .admin-tags-section-wrapper( - ng-show="projectTagsAll.length" - ) + .admin-tags-section-wrapper form.add-tag-container.new-value.hidden tg-color-selection.color-column( tg-allow-empty="true" @@ -42,7 +39,14 @@ section svg-icon="icon-close" ) - .table-header.table-tags-editor + p.tags-empty( + ng-if="!projectTagsAll.length && !ctrl.loading" + translate="ADMIN.PROJECT_VALUES_TAGS.EMPTY" + ) + + .table-header.table-tags-editor( + ng-if="projectTagsAll.length" + ) div.row.header-tag-row .color-column(translate="COMMON.FIELDS.COLOR") .status-name(translate="COMMON.FIELDS.NAME") @@ -57,7 +61,9 @@ section svg-icon="icon-search" ) - .table-main.table-admin-tags + .table-main.table-admin-tags( + ng-if="projectTagsAll.length" + ) div(ng-show="!mixingTags.toTag") .admin-attributes-section-wrapper-empty( ng-show="!projectTags.length" diff --git a/app/styles/layout/admin-project-tags.scss b/app/styles/layout/admin-project-tags.scss index 3880e826..0fdeb511 100644 --- a/app/styles/layout/admin-project-tags.scss +++ b/app/styles/layout/admin-project-tags.scss @@ -1,3 +1,8 @@ +.tags-empty { + padding: 10vh 0 0; + text-align: center; +} + .add-tag-container { align-items: center; background: $mass-white;