diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/DocumentDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/DocumentDao.java index b84df3d9..25d6eb87 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/DocumentDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/DocumentDao.java @@ -203,7 +203,7 @@ public class DocumentDao { StringBuilder sb = new StringBuilder("select distinct d.DOC_ID_C c0, d.DOC_TITLE_C c1, d.DOC_DESCRIPTION_C c2, d.DOC_CREATEDATE_D c3, d.DOC_LANGUAGE_C c4, "); sb.append(" (select count(s.SHA_ID_C) from T_SHARE s, T_ACL ac where ac.ACL_SOURCEID_C = d.DOC_ID_C and ac.ACL_TARGETID_C = s.SHA_ID_C and ac.ACL_DELETEDATE_D is null and s.SHA_DELETEDATE_D is null) c5, "); sb.append(" (select count(f.FIL_ID_C) from T_FILE f where f.FIL_DELETEDATE_D is null and f.FIL_IDDOC_C = d.DOC_ID_C) c6, "); - sb.append(" rs2.RTP_ID_C c7 "); + sb.append(" rs2.RTP_ID_C c7, rs2.RTP_NAME_C "); sb.append(" from T_DOCUMENT d "); sb.append(" left join (select rs.*, rs3.idDocument\n" + "from T_ROUTE_STEP rs \n" + @@ -283,7 +283,8 @@ public class DocumentDao { documentDto.setLanguage((String) o[i++]); documentDto.setShared(((Number) o[i++]).intValue() > 0); documentDto.setFileCount(((Number) o[i++]).intValue()); - documentDto.setActiveRoute(o[i] != null); + documentDto.setActiveRoute(o[i++] != null); + documentDto.setCurrentStepName((String) o[i]); documentDtoList.add(documentDto); } diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/dto/DocumentDto.java b/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/dto/DocumentDto.java index b0bf8447..ef7b4075 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/dto/DocumentDto.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/jpa/dto/DocumentDto.java @@ -91,6 +91,11 @@ public class DocumentDto { */ private boolean activeRoute; + /** + * Current route step name. + */ + private String currentStepName; + public String getId() { return id; } @@ -223,8 +228,16 @@ public class DocumentDto { return activeRoute; } - public DocumentDto setActiveRoute(boolean activeRoute) { + public void setActiveRoute(boolean activeRoute) { this.activeRoute = activeRoute; + } + + public String getCurrentStepName() { + return currentStepName; + } + + public DocumentDto setCurrentStepName(String currentStepName) { + this.currentStepName = currentStepName; return this; } } diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java index 46ba2ccf..0db1548b 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java @@ -334,6 +334,7 @@ public class DocumentResource extends BaseResource { * @apiSuccess {String} documents.language Language * @apiSuccess {Boolean} documents.shared True if the document is shared * @apiSuccess {Boolean} documents.active_route True if a route is active on this document + * @apiSuccess {Boolean} documents.current_step_name Name of the current route step * @apiSuccess {Number} documents.file_count Number of files in this document * @apiSuccess {Object[]} documents.tags List of tags * @apiSuccess {String} documents.tags.id ID @@ -399,6 +400,7 @@ public class DocumentResource extends BaseResource { .add("language", documentDto.getLanguage()) .add("shared", documentDto.getShared()) .add("active_route", documentDto.isActiveRoute()) + .add("current_step_name", JsonUtil.nullable(documentDto.getCurrentStepName())) .add("file_count", documentDto.getFileCount()) .add("tags", tags)); } diff --git a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js index 20997c39..b74ba896 100644 --- a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js +++ b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentDefault.js @@ -74,7 +74,7 @@ angular.module('docs').controller('DocumentDefault', function ($scope, $rootScop }); }; - //Navigate to the selected file + // Navigate to the selected file $scope.openFile = function (file) { $state.go('document.default.file', { fileId: file.id }) }; @@ -125,4 +125,14 @@ angular.module('docs').controller('DocumentDefault', function ($scope, $rootScop }); }); }; + + // Load active routes + Restangular.one('document/list').get({ + asc: false, + sort_column: 3, + limit: 10, + search: 'workflow:me' + }).then(function (data) { + $scope.documentsWorkflow = data.documents; + }); }); \ No newline at end of file diff --git a/docs-web/src/main/webapp/src/fonts/fa-brands-400.eot b/docs-web/src/main/webapp/src/fonts/fa-brands-400.eot new file mode 100644 index 00000000..0a1ef3f7 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-brands-400.eot differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-brands-400.svg b/docs-web/src/main/webapp/src/fonts/fa-brands-400.svg new file mode 100644 index 00000000..4c237533 --- /dev/null +++ b/docs-web/src/main/webapp/src/fonts/fa-brands-400.svg @@ -0,0 +1,1008 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs-web/src/main/webapp/src/fonts/fa-brands-400.ttf b/docs-web/src/main/webapp/src/fonts/fa-brands-400.ttf new file mode 100644 index 00000000..f9908513 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-brands-400.ttf differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff b/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff new file mode 100644 index 00000000..2e874012 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff2 b/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff2 new file mode 100644 index 00000000..0d575fd5 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-brands-400.woff2 differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-regular-400.eot b/docs-web/src/main/webapp/src/fonts/fa-regular-400.eot new file mode 100644 index 00000000..cda0a84c Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-regular-400.eot differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-regular-400.svg b/docs-web/src/main/webapp/src/fonts/fa-regular-400.svg new file mode 100644 index 00000000..2875252e --- /dev/null +++ b/docs-web/src/main/webapp/src/fonts/fa-regular-400.svg @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs-web/src/main/webapp/src/fonts/fa-regular-400.ttf b/docs-web/src/main/webapp/src/fonts/fa-regular-400.ttf new file mode 100644 index 00000000..ee13f848 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-regular-400.ttf differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff b/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff new file mode 100644 index 00000000..bcd83435 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff2 b/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff2 new file mode 100644 index 00000000..35cc7b3b Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-regular-400.woff2 differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-solid-900.eot b/docs-web/src/main/webapp/src/fonts/fa-solid-900.eot new file mode 100644 index 00000000..ef75106b Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-solid-900.eot differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-solid-900.svg b/docs-web/src/main/webapp/src/fonts/fa-solid-900.svg new file mode 100644 index 00000000..0ae8e329 --- /dev/null +++ b/docs-web/src/main/webapp/src/fonts/fa-solid-900.svg @@ -0,0 +1,1518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs-web/src/main/webapp/src/fonts/fa-solid-900.ttf b/docs-web/src/main/webapp/src/fonts/fa-solid-900.ttf new file mode 100644 index 00000000..17bb6747 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-solid-900.ttf differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff b/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff new file mode 100644 index 00000000..4cf2a4fe Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff differ diff --git a/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff2 b/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff2 new file mode 100644 index 00000000..eea9aa22 Binary files /dev/null and b/docs-web/src/main/webapp/src/fonts/fa-solid-900.woff2 differ diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index b93a4953..00000000 Binary files a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg deleted file mode 100644 index 94fb5490..00000000 --- a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.ttf b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index 1413fc60..00000000 Binary files a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.woff b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.woff deleted file mode 100644 index 9e612858..00000000 Binary files a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.woff2 b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.woff2 deleted file mode 100644 index 64539b54..00000000 Binary files a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.woff2 and /dev/null differ diff --git a/docs-web/src/main/webapp/src/img/loader.gif b/docs-web/src/main/webapp/src/img/loader.gif deleted file mode 100644 index 5b33f7e5..00000000 Binary files a/docs-web/src/main/webapp/src/img/loader.gif and /dev/null differ diff --git a/docs-web/src/main/webapp/src/index.html b/docs-web/src/main/webapp/src/index.html index bfac96bc..c8520c0f 100644 --- a/docs-web/src/main/webapp/src/index.html +++ b/docs-web/src/main/webapp/src/index.html @@ -9,6 +9,7 @@ + @@ -125,38 +126,38 @@