11< form class ="view-form edit-collection-form " name ="collectionForm " ng-submit ="save(collectionForm.$valid) " novalidate >
2-
3- < div class ="view-title-container flex-row ">
4- < h1 ng-if ="collection.addedBy "> Edit Collection</ h1 >
5- < h1 ng-if ="!collection.addedBy "> Add Collection</ h1 >
6- < div class ="actions ">
7- < button class ="btn btn-default btn-sm "
8- ng-if ="!collection.addedBy " ui-sref ="p.collection.list ">
9- Cancel
10- </ button >
11- < button class ="btn btn-default btn-sm "
12- ng-if ="collection.addedBy " ng-click ="goToDetail() ">
13- Cancel
14- </ button >
15- < button class ="btn btn-default btn-sm "
16- ng-if ="collection.addedBy && !collection.isPublished " ng-click ="publish() " type ="button ">
17- < span class ="glyphicon glyphicon-ok-circle "> </ span > < span > Publish</ span >
18- </ button >
19- < button class ="btn btn-default btn-sm "
20- ng-if ="collection.addedBy && collection.isPublished " ng-click ="unpublish() " type ="button ">
21- < span class ="glyphicon glyphicon-ban-circle "> </ span > < span > Unpublish</ span >
22- </ button >
23- < button class ="btn btn-primary btn-sm " type ="submit ">
24- Save
25- </ button >
26- < button class ="btn btn-default btn-sm "
27- ng-if ="collection.addedBy " ng-click ="delete() " type ="button ">
28- < span class ="glyphicon glyphicon-trash "> </ span > < span > Delete</ span >
29- </ button >
30- </ div >
2+
3+ < div class ="view-title-container flex-row ">
4+ < h1 ng-if ="collection.addedBy "> Edit Collection</ h1 >
5+ < h1 ng-if ="!collection.addedBy "> Add Collection</ h1 >
6+ < div class ="actions ">
7+ < button class ="btn btn-default btn-sm "
8+ ng-if ="!collection.addedBy " ui-sref ="p.collection.list ">
9+ Cancel
10+ </ button >
11+ < button class ="btn btn-default btn-sm "
12+ ng-if ="collection.addedBy " ng-click ="goToDetail() ">
13+ Cancel
14+ </ button >
15+ < button class ="btn btn-default btn-sm "
16+ ng-if ="collection.addedBy && !collection.isPublished " ng-click ="publish() " type ="button ">
17+ < span class ="glyphicon glyphicon-ok-circle "> </ span > < span > Publish</ span >
18+ </ button >
19+ < button class ="btn btn-default btn-sm "
20+ ng-if ="collection.addedBy && collection.isPublished " ng-click ="unpublish() " type ="button ">
21+ < span class ="glyphicon glyphicon-ban-circle "> </ span > < span > Unpublish</ span >
22+ </ button >
23+ < button class ="btn btn-primary btn-sm " type ="submit ">
24+ Save
25+ </ button >
26+ < button class ="btn btn-default btn-sm "
27+ ng-if ="collection.addedBy " ng-click ="delete() " type ="button ">
28+ < span class ="glyphicon glyphicon-trash "> </ span > < span > Delete</ span >
29+ </ button >
3130 </ div >
31+ </ div >
3232
33- < div class ="view-body-container ">
34- < section >
35- < div class ="row ">
36- < div class ="col-md-3 ">
37- < div class ="form-group " x-show-errors >
38- < label class ="control-label " for ="displayName "> Name</ label >
39- < input class ="form-control " id ="displayName " name ="displayName " ng-model ='collection.displayName ' required >
40- < div ng-messages ="collectionForm.displayName.$error " role ="alert ">
41- < p class ="help-block error-text " ng-message ="required "> Name is required.</ p >
42- </ div >
43- </ div >
44- </ div >
45- < div class ="col-md-3 ">
46- < div class ="form-group ">
47- < label class ="control-label " for ="type "> Type</ label >
48- < select class ="form-control " id ="type " ng-model ='collection.type ' ng-options ="t.id as t.title for t in types "> </ select >
49- </ div >
50- </ div >
51- < div class ="col-md-3 ">
52- < div class ="form-group " x-show-errors >
53- < label for ="date " class ="control-label "> Date</ label >
54- < div class ="form-control date-picker " name ="date " x-modal-date-picker
55- x-selected-date ="collection.date " x-header ="'Choose a Date' ">
56- < span ng-if ="!collection.date "> None</ span > {{ collection.date | amDateFormat:'YYYY-MM-DD'}}
57- < span class ="glyphicon glyphicon-calendar "> </ span >
58- </ div >
59- < div ng-messages ="collectionForm.date.$error " role ="alert ">
60- < p class ="help-block error-text " ng-message ="required "> Date is required.</ p >
61- </ div >
62- </ div >
63- </ div >
33+ < div class ="view-body-container ">
34+ < section >
35+ < div class ="row ">
36+ < div class ="col-md-3 ">
37+ < div class ="form-group " x-show-errors >
38+ < label class ="control-label " for ="displayName "> Name</ label >
39+ < input class ="form-control " id ="displayName " name ="displayName " ng-model ='collection.displayName ' required >
40+ < div ng-messages ="collectionForm.displayName.$error " role ="alert ">
41+ < p class ="help-block error-text " ng-message ="required "> Name is required.</ p >
6442 </ div >
65- < div class ="row ">
66- < div class ="col-sm-12 ">
67- < label class ="control-label " for ="description "> Description</ label >
68- < textarea class ="form-control " id ="description " name ="description " rows ="3 " ng-model ="collection.description "> </ textarea >
69- </ div >
43+ </ div >
44+ </ div >
45+ < div class ="col-md-3 ">
46+ < div class ="form-group ">
47+ < label class ="control-label " for ="type "> Type</ label >
48+ < select class ="form-control " id ="type " ng-model ='collection.type ' ng-options ="t.id as t.title for t in types "> </ select >
49+ </ div >
50+ </ div >
51+ < div class ="col-md-3 ">
52+ < div class ="form-group " x-show-errors >
53+ < label for ="date " class ="control-label "> Date</ label >
54+ < div class ="form-control date-picker " name ="date " x-modal-date-picker
55+ x-selected-date ="collection.date " x-header ="'Choose a Date' ">
56+ < span ng-if ="!collection.date "> None</ span > {{ collection.date | amDateFormat:'YYYY-MM-DD'}}
57+ < span class ="glyphicon glyphicon-calendar "> </ span >
7058 </ div >
71- </ section >
59+ < div ng-messages ="collectionForm.date.$error " role ="alert ">
60+ < p class ="help-block error-text " ng-message ="required "> Date is required.</ p >
61+ </ div >
62+ </ div >
63+ </ div >
64+ </ div >
65+ < div class ="row ">
66+ < div class ="col-sm-12 ">
67+ < label class ="control-label " for ="description "> Description</ label >
68+ < textarea class ="form-control " id ="description " name ="description " rows ="3 " ng-model ="collection.description "> </ textarea >
69+ </ div >
70+ </ div >
71+ </ section >
7272
73- < section ng-if ="collection.addedBy ">
74- < section >
75- < div class ="row ">
76- < div class ="col-sm-12 ">
77- < h2 > Main Document</ h2 >
78- < div class ="button-bar ">
79- < button class ="btn btn-default btn-sm " title ="Link main document to this collection " x-document-mgr-link-modal x-project ="project " x-target ="linkedMainDocument "
80- x-target-name ="collection.displayName " x-on-ok ="updateMainDocument "> < span class ="glyphicon glyphicon-link "> </ span > < span > Link Main Document</ span >
81- </ button >
82- </ div >
83- < div class ="table-container collection-docs ">
84- < table class ="table collection-document-table " ng-table ="mainTableParams ">
85- < tr ng-repeat ="d in $data ">
86- < td header-class ="'name-col' " data-title ="'Name' " title: 'Name'> {{ d.document.displayName | removeExtension }}</ td >
87- < td header-class ="'date-col' " data-title ="'Document Date' " title: 'Date'> {{ d.document.documentDate | amDateFormat:'YYYY-MM-DD' }}</ td >
88- < td header-class ="'date-uploaded-col' " data-title ="'Date Uploaded' " title: 'Uploaded'> {{ d.document.dateUploaded | amDateFormat:'YYYY-MM-DD' }}</ td >
89- < td header-class ="'status-col' " data-title ="'Status' " title: 'Uploaded'>
90- < span class ="label label-success " ng-if ="d.document.isPublished == true "> PUBLISHED</ span >
91- < span class ="label label-unpublished " ng-if ="d.document.isPublished == false "> UNPUBLISHED</ span >
92- </ td >
93- < td class ="actions-col " header-class ="'actions-col x1' ">
94- < a class ="btn icon-btn " title ="Remove document from this collection " ng-click ="removeMainDocument(d.document) ">
95- < span class ="glyphicon glyphicon-trash "> </ span >
96- </ a >
97- </ td >
98- </ tr >
99- < tr class ="no-results " ng-if ="!$data || $data.length === 0 ">
100- < td colspan ="5 "> No document found.</ td >
101- </ tr >
102- </ table >
103- </ div >
104- </ div >
105- </ div >
106- </ section >
107- < section >
108- < div class ="row ">
109- < div class ="col-sm-12 ">
110- < h2 > Other Documents</ h2 >
111- < div class ="button-bar ">
112- < button class ="btn btn-default btn-sm " title ="Link other documents to this collection " x-document-mgr-link-modal x-project ="project " x-target ="linkedOtherDocuments "
113- x-target-name ="collection.displayName " x-on-ok ="updateOtherDocuments "> < span class ="glyphicon glyphicon-link "> </ span > < span > Link Other Documents</ span >
114- </ button >
115- < button class ="btn btn-default btn-sm "
116- title ="Set the default order documents will be displayed "
117- x-reorder-collection-modal x-collection ="collection "
118- x-on-save ="otherDocsReordered ">
119- < span class ="glyphicon glyphicon-sort "> </ span >
120- < span > Set Document Order</ span >
121- </ button >
122- </ div >
123- < div class ="table-container collection-docs ">
124- < table class ="table collection-document-table " ng-table ="otherTableParams ">
125- < tr ng-repeat ="d in $data ">
126- < td header-class ="'name-col' " data-title ="'Name' " sortable ="'Name ' "> {{ d.document.displayName | removeExtension }}</ td >
127- < td header-class ="'date-col' " data-title ="'Document Date' " sortable ="'Date ' "> {{ d.document.documentDate | amDateFormat:'YYYY-MM-DD' }}</ td >
128- < td header-class ="'date-uploaded-col' " data-title ="'Date Uploaded' " sortable ="'Uploaded ' "> {{ d.document.dateUploaded | amDateFormat:'YYYY-MM-DD' }}</ td >
129- < td header-class ="'status-col' " data-title ="'Status' " title: 'Uploaded'>
130- < span class ="label label-success " ng-if ="d.document.isPublished == true "> PUBLISHED</ span >
131- < span class ="label label-unpublished " ng-if ="d.document.isPublished == false "> UNPUBLISHED</ span >
132- </ td >
133- < td class ="actions-col " header-class ="'actions-col x1' ">
134- < a class ="btn icon-btn " title ="Remove document from this collection " ng-click ="removeOtherDocument(d.document) ">
135- < span class ="glyphicon glyphicon-trash "> </ span >
136- </ a >
137- </ td >
138- </ tr >
139- < tr class ="no-results " ng-if ="!$data || $data.length === 0 ">
140- < td colspan ="5 "> No documents found.</ td >
141- </ tr >
142- </ table >
143- </ div >
144- </ div >
145- </ div >
146- </ section >
147- </ section >
73+ < section ng-if ="collection.addedBy ">
74+ < section >
75+ < div class ="row ">
76+ < div class ="col-sm-12 ">
77+ < h2 > Main Document</ h2 >
78+ < div class ="button-bar ">
79+ < button class ="btn btn-default btn-sm " title ="Link main document to this collection " x-document-mgr-link-modal x-project ="project " x-target ="linkedMainDocument "
80+ x-target-name ="collection.displayName " x-on-ok ="updateMainDocument "> < span class ="glyphicon glyphicon-link "> </ span > < span > Link Main Document</ span >
81+ </ button >
82+ </ div >
83+ < div class ="table-container collection-docs ">
84+ < table class ="table collection-document-table " ng-table ="mainTableParams ">
85+ < tr ng-repeat ="d in $data ">
86+ < td header-class ="'name-col' " data-title ="'Name' " title: 'Name'> {{ d.document.displayName | removeExtension }}</ td >
87+ < td header-class ="'date-col' " data-title ="'Document Date' " title: 'Date'> {{ d.document.documentDate | amDateFormat:'YYYY-MM-DD' }}</ td >
88+ < td header-class ="'date-uploaded-col' " data-title ="'Date Uploaded' " title: 'Uploaded'> {{ d.document.dateUploaded | amDateFormat:'YYYY-MM-DD' }}</ td >
89+ < td header-class ="'status-col' " data-title ="'Status' " title: 'Uploaded'>
90+ < span class ="label label-success " ng-if ="d.document.isPublished == true "> PUBLISHED</ span >
91+ < span class ="label label-unpublished " ng-if ="d.document.isPublished == false "> UNPUBLISHED</ span >
92+ </ td >
93+ < td class ="actions-col " header-class ="'actions-col x1' ">
94+ < a class ="btn icon-btn " title ="Remove document from this collection " ng-click ="removeMainDocument(d.document) ">
95+ < span class ="glyphicon glyphicon-trash "> </ span >
96+ </ a >
97+ </ td >
98+ </ tr >
99+ < tr class ="no-results " ng-if ="!$data || $data.length === 0 ">
100+ < td colspan ="5 "> No document found.</ td >
101+ </ tr >
102+ </ table >
103+ </ div >
104+ </ div >
105+ </ div >
106+ </ section >
107+ < section >
108+ < div class ="row ">
109+ < div class ="col-sm-12 ">
110+ < h2 > Other Documents</ h2 >
111+ < div class ="button-bar ">
112+ < button class ="btn btn-default btn-sm " title ="Link other documents to this collection " x-document-mgr-link-modal x-project ="project " x-target ="linkedOtherDocuments "
113+ x-target-name ="collection.displayName " x-on-ok ="updateOtherDocuments "> < span class ="glyphicon glyphicon-link "> </ span > < span > Link Other Documents</ span >
114+ </ button >
115+ < button class ="btn btn-default btn-sm "
116+ title ="Set the default order documents will be displayed "
117+ x-reorder-collection-modal x-collection ="collection "
118+ x-on-save ="otherDocsReordered ">
119+ < span class ="glyphicon glyphicon-sort "> </ span >
120+ < span > Set Document Order</ span >
121+ </ button >
122+ </ div >
123+ < div class ="table-container collection-docs ">
124+ < table class ="table collection-document-table " ng-table ="otherTableParams ">
125+ < tr ng-repeat ="d in $data ">
126+ < td header-class ="'name-col' " data-title ="'Name' " sortable ="'document.displayName ' "> {{ d.document.displayName | removeExtension }}</ td >
127+ < td header-class ="'date-col' " data-title ="'Document Date' " sortable ="'document.documentDate ' "> {{ d.document.documentDate | amDateFormat:'YYYY-MM-DD' }}</ td >
128+ < td header-class ="'date-uploaded-col' " data-title ="'Date Uploaded' " sortable ="'document.dateUploaded ' "> {{ d.document.dateUploaded | amDateFormat:'YYYY-MM-DD' }}</ td >
129+ < td header-class ="'status-col' " data-title ="'Status' " title: 'Uploaded'>
130+ < span class ="label label-success " ng-if ="d.document.isPublished == true "> PUBLISHED</ span >
131+ < span class ="label label-unpublished " ng-if ="d.document.isPublished == false "> UNPUBLISHED</ span >
132+ </ td >
133+ < td class ="actions-col " header-class ="'actions-col x1' ">
134+ < a class ="btn icon-btn " title ="Remove document from this collection " ng-click ="removeOtherDocument(d.document) ">
135+ < span class ="glyphicon glyphicon-trash "> </ span >
136+ </ a >
137+ </ td >
138+ </ tr >
139+ < tr class ="no-results " ng-if ="!$data || $data.length === 0 ">
140+ < td colspan ="5 "> No documents found.</ td >
141+ </ tr >
142+ </ table >
143+ </ div >
144+ </ div >
145+ </ div >
146+ </ section >
147+ </ section >
148148
149- </ div >
149+ </ div >
150150
151- </ form >
151+ </ form >
0 commit comments