Debian Codegraph @

lemonldap-ng-manager/site/templates/notifications.tpl

raw
1 <TMPL_INCLUDE NAME="header.tpl">
2 <TMPL_IF NAME="INSTANCE_NAME">
3 <title><TMPL_VAR NAME="INSTANCE_NAME"> Notifications</title>
4 <TMPL_ELSE>
5 <title>LemonLDAP::NG Notifications</title>
6 </TMPL_IF>
7 </head>
8
9 <body ng-app="llngNotificationsExplorer" ng-controller="NotificationsExplorerCtrl" ng-csp>
10
11 <TMPL_INCLUDE NAME="menubar.tpl">
12
13 <div id="content" class="row container-fluid">
14 <div id="pleaseWait" ng-show="waiting"><span trspan="waitingForDatas"></span></div>
15
16 <!-- Tree -->
17 <aside id="left" class="col-lg-4 col-md-4 col-sm-5 col-xs-12 scrollable " ng-class="{'hidden-xs':!showT}" role="complementary">
18 <div class="navbar navbar-default">
19 <div class="navbar-collapse">
20 <ul class="nav navbar-nav" role="grid">
21 <li><a id="a-actives" href="#" role="row" ng-style="activesStyle"><i class="glyphicon glyphicon-eye-open"></i> {{translate('actives')}}</a></li>
22 <li><a id="a-done" href="#!/done" role="row" ng-style="doneStyle"><i class="glyphicon glyphicon-check"></i> {{translate('dones')}}</a></li>
23 <li><a id="a-new" href="#!/new" role="row" ng-style="newStyle"><i class="glyphicon glyphicon-plus-sign"></i> {{translate('create')}}</a></li>
24 </ul>
25 </div>
26 </div>
27 <div ng-show="data.length!=0" class="text-center"><p class="badge">{{total}} {{translate('notification_s')}}</p></div>
28 <div class="region region-sidebar-first">
29 <section id="block-superfish-1" class="block block-superfish clearfix">
30 <div ui-tree data-drag-enabled="false" id="tree-root">
31 <div ng-show="data.length==0" class="center">
32 <span class="label label-warning">{{translate('noData')}}</span>
33 </div>
34 <ol ui-tree-nodes="" ng-model="data">
35 <li ng-repeat="node in data track by node.id" ui-tree-node ng-include="'nodes_renderer.html'" collapsed="true"></li>
36 </ol>
37 </div>
38 </section>
39 </div>
40 <div class="hresizer hidden-xs" resizer="vertical" resizer-left="#left" resizer-right="#right"></div>
41 </aside>
42
43 <!-- Right(main) div -->
44 <div id="right" class="col-lg-8 col-md-8 col-sm-7 col-xs-12 scrollable" ng-class="{'hidden-xs':showT&&!showM}">
45 <!-- Menu buttons -->
46 <div ng-if="type=='new'|| currentNotification" class="lmmenu navbar navbar-default" ng-class="{'hidden-xs':!showM}">
47 <div class="navbar-collapse" ng-class="{'collapse':!showM}" id="formmenu">
48 <ul class="nav navbar-nav">
49 <li ng-repeat="button in menu[type]" ng-include="'menubutton.html'"></li>
50 <li uib-dropdown class="visible-xs">
51 <a id="langmenu" name="menu" uib-dropdown-toggle data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Menu <span class="caret"></span></a>
52 <ul uib-dropdown-menu aria-labelled-by="langmenu" role="grid">
53 <li ng-repeat="link in links"><a href="{{link.target}}" role="row"><i ng-if="link.icon" class="glyphicon glyphicon-{{link.icon}}"></i> {{translate(link.title)}}</a></li>
54 <li ng-repeat="menulink in menulinks"><a href="{{menulink.target}}" role="row"><i ng-if="menulink.icon" class="glyphicon glyphicon-{{menulink.icon}}"></i> {{translate(menulink.title)}}</a></li>
55 <li ng-include="'languages.html'"></li>
56 <TMPL_IF NAME="INSTANCE_NAME">
57 <li><a href="https://lemonldap-ng.org"><TMPL_VAR NAME="INSTANCE_NAME"></a></li>
58 </TMPL_IF>
59 </ul>
60 </li>
61 </ul>
62 </div>
63 </div>
64 <!-- Notification content -->
65 <div class="panel panel-default" ng-hide="currentNotification===null">
66 <div class="panel-heading">
67 <h1 class="panel-title text-center">{{translate('view')}}</h1>
68 </div>
69 <table class="table">
70 <tr>
71 <th>{{translate('uid')}}</th>
72 <td>{{currentNotification.uid}}</td>
73 </tr>
74 <tr>
75 <th>{{translate('reference')}}</th>
76 <td>{{currentNotification.reference}}</td>
77 </tr>
78 <tr ng-if="currentNotification.date">
79 <th>{{translate('date')}}</th>
80 <td>{{currentNotification.date}}</td>
81 </tr>
82 <tr ng-if="currentNotification.condition">
83 <th>{{translate('condition')}}</th>
84 <td>{{currentNotification.condition}}</td>
85 </tr>
86 <tr ng-if="currentNotification.title">
87 <th>{{translate('title')}}</th>
88 <td>{{currentNotification.title}}</td>
89 </tr>
90 <tr ng-if="currentNotification.subtitle">
91 <th>{{translate('subtitle')}}</th>
92 <td>{{currentNotification.subtitle}}</td>
93 </tr>
94 <tr ng-if="currentNotification.text">
95 <th>{{translate('text')}}</th>
96 <td><textarea rows=5 class="form-control">{{currentNotification.text}}</textarea></td>
97 </tr>
98 <tr ng-if="currentNotification.check">
99 <th>{{translate('checkboxes')}}</th>
100 <td><textarea rows=1 class="form-control">{{currentNotification.check}}</textarea></td>
101 </tr>
102 <tr ng-if="currentNotification.done">
103 <th>{{translate('internalReference')}}</th>
104 <td>{{currentNotification.done}}</td>
105 </tr>
106 <tr ng-if="currentNotification.notifications">
107 <th>{{translate('notification')}}</th>
108 <td><textarea ng-repeat="n in currentNotification.notifications" rows=5 class="form-control">{{n}}</textarea></td>
109 </tr>
110 </table>
111 </div>
112 <!-- Create form -->
113 <div class="panel panel-default" ng-if="showForm">
114 <div class="panel-heading">
115 <h1 class="panel-title text-center">{{translate('create')}}</h1>
116 </div>
117 <form>
118 <table class="table">
119 <tr>
120 <th>{{translate('uid')}}</th>
121 <td><input type="text" class="form-control" ng-model="form.uid" /></td>
122 </tr>
123 <tr>
124 <th>{{translate('date')}}</th>
125 <td>
126 <p class="input-group">
127 <input type="text" class="form-control" uib-datepicker-popup="yyyy-MM-dd" ng-model="form.date" min-date="minDate" is-open="popup.opened" datepicker-options="dateOptions" popup-placement="auto top-right"/>
128 <span class="input-group-btn">
129 <button type="button" class="btn btn-default" ng-click="popupopen()"><i class="glyphicon glyphicon-calendar"></i></button>
130 </span>
131 </p>
132 </td>
133 </tr>
134 <tr>
135 <th>{{translate('reference')}}</th>
136 <td><input type="text" class="form-control" ng-model="form.reference" /></td>
137 </tr>
138 <tr>
139 <th>{{translate('condition')}}</th>
140 <td><input type="text" class="form-control" ng-model="form.condition"/></td>
141 </tr>
142 <tr>
143 <th>{{translate('content')}}</th>
144 <td>
145 <textarea rows=5 class="form-control" ng-model="form.xml"></textarea>
146 <div class="alert alert-info">
147 <p>{{translate('allowedMarkups')}}</p>
148 <table border="0">
149 <thead>
150 <tr><th>JSON</th><th>XML</th></tr>
151 </thead>
152 <tbody><tr>
153 <td>
154 <pre>
155 {
156 "title": "...",
157 "subtitle": "...",
158 "text": "...",
159 "check": [ "...", "..." ]
160 }
161 </pre>
162 </td>
163 <td>
164 <ul>
165 <li>&lt;title&gt;...&lt;/title&gt;</li>
166 <li>&lt;subtitle&gt;...&lt;/subtitle&gt;</li>
167 <li>&lt;text&gt;...&lt;/text&gt;</li>
168 <li>&lt;check&gt;...&lt;/check&gt;</li>
169 </ul>
170 </td>
171 </tr></tbody></table>
172 </div>
173 </td>
174 </tr>
175 </table>
176 </form>
177 </div>
178 </div>
179 </div>
180
181 <script type="text/ng-template" id="nodes_renderer.html">
182 <div ui-tree-handle class="tree-node tree-node-content panel-info" ng-class="{'bg-info':this.$modelValue===currentNotification.$modelValue,'tree-node-default':this.$modelValue!==currentNotification.$modelValue}">
183 <span ng-if="node.value">
184 <a id="a-{{node.value}}" class="btn btn-node btn-sm" ng-click="stoggle(this)">
185 <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
186 </a>
187 <span id="s-{{node.value}}" ng-click="stoggle(this)">{{node.value}} <span class="badge">{{node.count}}</span></span>
188 </span>
189 <span ng-if="node.notification">
190 <a class="btn btn-node btn-sm" ng-click="displayNotification(this)">
191 <span class="glyphicon glyphicon-pencil"></span>
192 </a>
193 <span id="s-{{node.notification}}" ng-click="displayNotification(this)">{{node.reference}} <i ng-if="node.date">({{notifDate(node.date)}})</i></span>
194 </span>
195 </div>
196 <ol ui-tree-nodes="" ng-model="node.nodes" ng-class="{hidden: collapsed}">
197 <li ng-repeat="node in node.nodes track by node.id" ui-tree-node ng-include="'nodes_renderer.html'" collapsed="true"></li>
198 </ol>
199 </script>
200
201 <script type="text/ng-template" id="alert.html">
202 <div class="modal-header">
203 <h3 class="modal-title" trspan="{{elem('message').title}}" />
204 </div>
205 <div class="modal-body" ng-if="elem('message').message">
206 <div class="modal-p">{{translateP(elem('message').message)}}</div>
207 </div>
208 <div class="modal-footer">
209 <button class="btn btn-primary" id="promptok" ng-click="ok()" trspan="ok"></button>
210 <button class="btn btn-warning" ng-click="cancel()" trspan="cancel"></button>
211 </div>
212 </script>
213
214 <TMPL_INCLUDE NAME="scripts.tpl">
215
216 <!-- //if:jsminified
217 <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/notifications.min.js"></script>
218 //else -->
219 <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/notifications.js"></script>
220 <!-- //endif -->
221
222 <TMPL_INCLUDE NAME="footer.tpl">