diff --git a/README.md b/README.md index 69e020d5..21985694 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![Twitter: @sismicsdocs](https://img.shields.io/badge/contact-@sismicsdocs-blue.svg?style=flat)](https://twitter.com/sismicsdocs) [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) [![Build Status](https://secure.travis-ci.org/sismics/docs.png)](http://travis-ci.org/sismics/docs) -[![Read the Docs](https://img.shields.io/readthedocs/pip.svg)](https://demo.sismicsdocs.com/apidoc/) Docs is an open source, lightweight document management system for individuals and businesses. diff --git a/docs-web/src/main/webapp/src/app/docs/controller/tag/Tag.js b/docs-web/src/main/webapp/src/app/docs/controller/tag/Tag.js index 33572c9f..b652b868 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/tag/Tag.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/tag/Tag.js @@ -7,6 +7,7 @@ angular.module('docs').controller('Tag', function($scope, Restangular, $state) { $scope.tag = { name: '', color: '#3a87ad' }; // Retrieve tags + $scope.tags = []; $scope.loadTags = function() { Restangular.one('tag/list').get().then(function(data) { $scope.tags = data.tags; @@ -14,13 +15,6 @@ angular.module('docs').controller('Tag', function($scope, Restangular, $state) { }; $scope.loadTags(); - /** - * Display a tag. - */ - $scope.viewTag = function(id) { - $state.go('tag.edit', { id: id }); - }; - /** * Add a tag. */ @@ -30,4 +24,14 @@ angular.module('docs').controller('Tag', function($scope, Restangular, $state) { $scope.tag = { name: '', color: '#3a87ad' }; }); }; + + /** + * Find children tags. + * @param parent + */ + $scope.getChildrenTags = function(parent) { + return _.filter($scope.tags, function(tag) { + return tag.parent === parent; + }); + }; }); \ No newline at end of file diff --git a/docs-web/src/main/webapp/src/locale/en.json b/docs-web/src/main/webapp/src/locale/en.json index 4b037c41..7bb5dac1 100644 --- a/docs-web/src/main/webapp/src/locale/en.json +++ b/docs-web/src/main/webapp/src/locale/en.json @@ -199,7 +199,6 @@ "tag": { "new_tag": "New tag", "search": "Search", - "edit_tag": "Edit tag", "default": { "title": "Tags", "message_1": "Tags are labels associated to documents.", diff --git a/docs-web/src/main/webapp/src/partial/docs/document.html b/docs-web/src/main/webapp/src/partial/docs/document.html index 2ad55053..7580c0d9 100644 --- a/docs-web/src/main/webapp/src/partial/docs/document.html +++ b/docs-web/src/main/webapp/src/partial/docs/document.html @@ -265,6 +265,10 @@ + +
- - -
+- - {{ tag.name }} - | -- - - - | -