merge filter og sookefelt funksjoner + litt redesign
[u/erikhf/frm.git] / src / components / sidebar / sidebar.html
1 <div class="sideBar">
2     <div *ng-if="activeOrgUnit">
3         <form *ng-if="editmode">
4             <div class="form-group">
5                 <label>Name</label>
6                 <input class="form-control" type="text" [(ng-model)]="activeOrgUnit.name">
7             </div>
8             <div class="form-group">
9                 <label>Short Name</label>
10                 <input class="form-control" type="text" [(ng-model)]="activeOrgUnit.shortName">
11             </div>
12             <div class="form-group">
13                 <label>Description</label>
14                 <textarea class="form-control" [(ng-model)]="activeOrgUnit.description" rows="3"></textarea>
15             </div>
16             <div class="form-group">
17                 <label>Code</label>
18                 <input class="form-control" type="text" [(ng-model)]="activeOrgUnit.code">
19             </div>
20             <div class="form-group">
21                 <label>Opening Date</label>
22                 <input class="form-control" type="date" [(ng-model)]="activeOrgUnit.openingDate">
23             </div>
24             <div class="form-group">
25                 <label>Closed Date</label>
26                 <input class="form-control" type="date" [(ng-model)]="activeOrgUnit.closedDate">
27             </div>
28             <div class="form-group">
29                 <label>URL</label>
30                 <input class="form-control" type="url" [(ng-model)]="activeOrgUnit.closedDate">
31             </div>
32             <fieldset class="form-group">
33                 <legend>Group(s)</legend>
34                 <div *ng-for="#group of activeOrgUnit.organisationUnitGroups">
35                     <input class="form-control" type="text" [(ng-model)]="group.name">
36                 </div>
37             </fieldset>
38         </form>
39         <section *ng-if="!editmode">
40             <label for="actOrgUnitName">Name</label>
41
42             <p id="actOrgUnitName">{{(activeOrgUnit.name) || "[None]"}}</p>
43
44             <label for="actOrgUnitShortName">Short Name</label>
45
46             <p id="actOrgUnitShortName">{{(activeOrgUnit.shortName)||["None"]}}</p>
47
48             <label for="actOrgUnitDescription">Description</label>
49
50             <p id="actOrgUnitDescription">{{(activeOrgUnit.description)||"None"}}</p>
51
52             <label for="actOrgUnitCode">Code</label>
53
54             <p id="actOrgUnitCode">{{(activeOrgUnit.code)||["None"]}}</p>
55
56             <label for="actOrgUnitOpeningDate">Opening Date</label>
57
58             <p id="actOrgUnitOpeningDate">{{activeOrgUnit.openingDate||["None"]}}</p>
59
60             <label for="actOrgUnitClosingDate">Closed Date</label>
61
62             <p id="actOrgUnitClosingDate">{{activeOrgUnit.closingDate||["None"]}}</p>
63
64             <label for="actOrgUnitURL">Url</label>
65
66             <p id="actOrgUnitURL">{{(activeOrgUnit.url) ||["None"]}}</p>
67
68             <label>Group(s)</label>
69             <ul *ng-for="#group of activeOrgUnit.organisationUnitGroups">
70                 <li>{{group.name}}</li>
71             </ul>
72         </section>
73         <button class="btn btn-default" (click)="editmode = !editmode">{{editmode ? "Cancel" : "Edit"}}</button>
74         <button *ng-if="editmode" class="btn btn-default" (click)="save()">Save</button>
75
76     </div>
77 </div>