| 1 |
<TMPL_INCLUDE NAME="header.tpl"> |
| 2 |
<TMPL_IF NAME="INSTANCE_NAME"> |
| 3 |
<title><TMPL_VAR NAME="INSTANCE_NAME"> Manager</title> |
| 4 |
<TMPL_ELSE> |
| 5 |
<title>LemonLDAP::NG Manager</title> |
| 6 |
</TMPL_IF> |
| 7 |
<link rel="prefetch" href="<TMPL_VAR NAME="STATIC_PREFIX">forms/home.html" /> |
| 8 |
<link rel="prefetch" href="<TMPL_VAR NAME="STATIC_PREFIX">struct.json" /> |
| 9 |
</head> |
| 10 |
|
| 11 |
<body ng-app="llngManager" ng-controller="TreeCtrl" ng-csp> |
| 12 |
|
| 13 |
<TMPL_INCLUDE NAME="menubar.tpl"> |
| 14 |
|
| 15 |
<div id="content" class="row container-fluid"> |
| 16 |
|
| 17 |
<TMPL_INCLUDE NAME="tree.tpl"> |
| 18 |
|
| 19 |
<!-- Right(main) div --> |
| 20 |
<div id="right" class="col-lg-8 col-md-8 col-sm-7 col-xs-12 scrollable" ng-class="{'hidden-xs':showT&&!showM}"> |
| 21 |
<!-- Form container --> |
| 22 |
<div id="top"> |
| 23 |
<!-- Menu buttons --> |
| 24 |
<div class="lmmenu navbar navbar-default" ng-class="{'hidden-xs':!showM}"> |
| 25 |
<div class="navbar-collapse" ng-class="{'collapse':!showM}" id="formmenu"> |
| 26 |
<ul class="nav navbar-nav"> |
| 27 |
<li><a class="link" ng-click="home()"><i class="glyphicon glyphicon-home"></i></a></li> |
| 28 |
<li> |
| 29 |
<a id="save" class="link" ng-click="save()" tabIndex="-1"> |
| 30 |
<i class="glyphicon glyphicon-cloud-upload"></i> |
| 31 |
{{translate('save')}} |
| 32 |
</a> |
| 33 |
</li> |
| 34 |
<li > |
| 35 |
<input id="forcesave" type="checkbox" ng-model="forceSave" uib-tooltip="{{translate('forceSave')}}" tooltip-placement="right" ng-show="confirmNeeded||currentCfg.next" role="checkbox" aria-label="Force save"> |
| 36 |
</li> |
| 37 |
<li uib-dropdown> |
| 38 |
<a id="navmenu" name="menu" uib-dropdown-toggle data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="glyphicon glyphicon-cog"></i> {{translate('browse')}} <span class="caret"></span></a> |
| 39 |
<ul uib-dropdown-menu aria-labelled-by="navmenu"> |
| 40 |
<li ng-class="{'disabled':!currentCfg.prev}"><a class="link" ng-click="currentCfg.prev && getCfg(currentCfg.prev.cfgNum)" uib-tooltip="{{currentCfg.prev.cfgLog || currentCfg.prev.cfgNum}}"><i class="glyphicon glyphicon-arrow-left"></i> {{translate('previous')}}</a></li> |
| 41 |
<li ng-class="{'disabled':!currentCfg.next}"><a class="link" ng-click="currentCfg.next && getCfg(currentCfg.next.cfgNum)" uib-tooltip="{{currentCfg.next.cfgLog || currentCfg.next.cfgNum}}"><i class="glyphicon glyphicon-arrow-right"></i> {{translate('next')}}</a></a></li> |
| 42 |
<li><a class="link" ng-click="getCfg('latest')" title="Latest configuration"><i class="glyphicon glyphicon-refresh"></i> {{translate('latest')}}</a></li> |
| 43 |
</ul> |
| 44 |
</li> |
| 45 |
<li><a class="link hidden-xs" ng-click="setShowHelp()"><i class="glyphicon" ng-class="{'glyphicon-eye-close': showH,'glyphicon-eye-open': !showH}" ></i> {{ translate((showH ? 'hideHelp' : 'showHelp')) }}</a></li> |
| 46 |
<li><a class="link hidden-xs" ng-if="clipboardAvailable && breadCrumb" ng-click="copyPath()"><i class="glyphicon glyphicon-copy" ng-class="{'flash': copySuccess}"> </i> {{ translate('copyPath') }}</a></li> |
| 47 |
<li ng-repeat="button in menu()" ng-include="'menubutton.html'"></li> |
| 48 |
<li uib-dropdown class="visible-xs"> |
| 49 |
<a id="langmenu" name="menu" uib-dropdown-toggle data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{translate('menu')}} <span class="caret"></span></a> |
| 50 |
<ul uib-dropdown-menu aria-labelled-by="langmenu" role="grid"> |
| 51 |
<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> |
| 52 |
<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> |
| 53 |
<li ng-include="'languages.html'"></li> |
| 54 |
<TMPL_IF NAME="INSTANCE_NAME"> |
| 55 |
<li><a href="https://lemonldap-ng.org"><TMPL_VAR NAME="INSTANCE_NAME"></a></li> |
| 56 |
</TMPL_IF> |
| 57 |
</ul> |
| 58 |
</li> |
| 59 |
</ul> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
|
| 63 |
<div id="breadcrumb"> |
| 64 |
<div class=""> |
| 65 |
<p class="small">{{ breadCrumb.slice(0,-1).join(" » ") }} </p> |
| 66 |
</div> |
| 67 |
</div> |
| 68 |
|
| 69 |
<form class="form-group slide-animate-container" ng-include="formPrefix+form+'.html'" scope="$scope" /> |
| 70 |
</div> |
| 71 |
<!-- Help container --> |
| 72 |
<div id="bottom" ng-if="showH" class="hidden-xs"> |
| 73 |
<div class="panel panel-default"> |
| 74 |
<div class="panel-body"> |
| 75 |
<iframe id="helpframe" width="100%" height="100%" ng-src="{{'<TMPL_VAR NAME="DOC_PREFIX">/pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe> |
| 76 |
</div> |
| 77 |
</div> |
| 78 |
</div> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
|
| 82 |
<!-- HTML recursive templates (used in `ng-repeat... ng-include="'template.html'") --> |
| 83 |
<!-- Tree nested node template --> |
| 84 |
<script type="text/ng-template" id="nodes_renderer.html"> |
| 85 |
<div ui-tree-handle class="tree-node panel-info" ng-class="{'bg-info':this.$modelValue===currentNode,'tree-node-default':this.$modelValue!==currentNode}"> |
| 86 |
<!-- Glyph icons --> |
| 87 |
<span ng-switch="node.nodes||node.nodes_cond?1:((node._nodes&&node._nodes.length>0)||(node._nodes_cond&&node._nodes_cond.length>0)?3:(node.cnodes&&node.cnodes.length>0?2:0))"> |
| 88 |
<!-- Undownloaded nodes (hash data)--> |
| 89 |
<a class="btn btn-sm" id="a-{{node.id}}" ng-switch-when="2" ng-click="openCnode(this)"> |
| 90 |
<span class="glyphicon glyphicon-chevron-right"></span> |
| 91 |
</a> |
| 92 |
<!-- Javascript nodes not yet bind to DOM --> |
| 93 |
<a class="btn btn-sm" id="a-{{node.id}}" ng-switch-when="3" ng-click="stoggle(this)"> |
| 94 |
<span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed, 'glyphicon-chevron-down': !collapsed}"></span> |
| 95 |
</a> |
| 96 |
<!-- Nodes already loaded and binded --> |
| 97 |
<a class="btn btn-sm" id="a-{{node.id}}" ng-switch-when="1" ng-click="toggle(this)"> |
| 98 |
<span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed, 'glyphicon-chevron-down': !collapsed}"></span> |
| 99 |
</a> |
| 100 |
<!-- Leaf --> |
| 101 |
<a class="btn btn-sm" ng-switch-default ng-click="displayForm(this)"> |
| 102 |
<span class="glyphicon glyphicon-pencil"></span> |
| 103 |
</a> |
| 104 |
</span> |
| 105 |
<!-- Node text with/without translation --> |
| 106 |
<span id="t-{{node.id}}" ng-if="keyWritable(this)" ng-click="displayForm(this)">{{node.title}}</span> |
| 107 |
<span id="t-{{node.id}}" ng-if="!keyWritable(this)" ng-click="displayForm(this)" trspan="{{node.title}}"></span> |
| 108 |
</div> |
| 109 |
<!-- Subnodes --> |
| 110 |
<ol ui-tree-nodes="btn btn-sm" ng-model="node.nodes" ng-class="{hidden: collapsed}"> |
| 111 |
<li ng-repeat="node in node.nodes track by node.id" ui-tree-node ng-include="'nodes_renderer.html'" collapsed="true"></li> |
| 112 |
</ol> |
| 113 |
<!-- Filtered subnodes (authParams mechanism) --> |
| 114 |
<ol ui-tree-nodes="btn btn-sm" ng-model="node.nodes_cond" ng-class="{hidden: collapsed}"> |
| 115 |
<li ng-repeat="(name,node) in node.nodes_cond track by node.id" ng-if="node.show" ui-tree-node ng-include="'nodes_renderer.html'" collapsed="true"></li> |
| 116 |
</ol> |
| 117 |
</script> |
| 118 |
|
| 119 |
<!-- Prompt --> |
| 120 |
<script type="text/ng-template" id="prompt.html"> |
| 121 |
<div role="alertdialog" aria-labelledby="ptitle" aria-describedby="ptitle"> |
| 122 |
<div class="modal-header"> |
| 123 |
<h3 id="ptitle" class="modal-title" trspan="{{elem('message').title}}" /> |
| 124 |
<TMPL_IF NAME="INSTANCE_NAME"><h4><TMPL_VAR NAME="INSTANCE_NAME"></h4></TMPL_IF> |
| 125 |
</div> |
| 126 |
<div class="modal-body"> |
| 127 |
<div class="input-group maxw"> |
| 128 |
<label class="input-group-addon" id="promptlabel" for="promptinput" trspan="{{elem('message').field}}"></label> |
| 129 |
<input id="promptinput" class="form-control" ng-model="result" aria-describedby="promptlabel"/> |
| 130 |
</div> |
| 131 |
</div> |
| 132 |
<div class="modal-footer"> |
| 133 |
<button class="btn btn-primary" id="promptok" ng-click="ok()" trspan="ok" role="button"></button> |
| 134 |
<button class="btn btn-warning" ng-click="cancel()" trspan="cancel" role="button"></button> |
| 135 |
</div> |
| 136 |
</div> |
| 137 |
</script> |
| 138 |
|
| 139 |
<!-- Message display --> |
| 140 |
<script type="text/ng-template" id="message.html"> |
| 141 |
<div role="alertdialog" aria-labelledby="mtitle" aria-describedby="mbody"> |
| 142 |
<div class="modal-header"> |
| 143 |
<h3 id="mtitle" class="modal-title" trspan="{{elem('message').title}}" /> |
| 144 |
<TMPL_IF NAME="INSTANCE_NAME"><h4><TMPL_VAR NAME="INSTANCE_NAME"></h4></TMPL_IF> |
| 145 |
</div> |
| 146 |
<div ng-if="elem('message').items[0] || elem('message').message" id="mbody" class="modal-body"> |
| 147 |
<div class="modal-p">{{translateP(elem('message').message)}}</div> |
| 148 |
<ul class="main-modal-ul" ng-model="elem('message').items"> |
| 149 |
<li ng-repeat="item in elem('message').items" ng-include="'messageitem.html'"/> |
| 150 |
</ul> |
| 151 |
</div> |
| 152 |
<div class="modal-footer"> |
| 153 |
<button class="btn btn-primary" id="messageok" ng-click="ok()" trspan="ok" role="button"></button> |
| 154 |
<button class="btn btn-warning" ng-click="cancel()" ng-if="elem('message').displayCancel" trspan="cancel" role="button"></button> |
| 155 |
</div> |
| 156 |
</div> |
| 157 |
</script> |
| 158 |
|
| 159 |
<script type="text/ng-template" id="messageitem.html"> |
| 160 |
<div class="modal-p">{{translateP(item.message)}}</div> |
| 161 |
<ul class="modal-ul" ng-model="item.items"> |
| 162 |
<li ng-repeat="item in item.items" ng-include="'messageitem.html'"/> |
| 163 |
</ul> |
| 164 |
</script> |
| 165 |
|
| 166 |
<!-- Password question --> |
| 167 |
<script type="text/ng-template" id="password.html"> |
| 168 |
<div role="alertdialog" aria-labelledby="pwtitle" aria-describedby="pwtitle"> |
| 169 |
<div class="modal-header"> |
| 170 |
<h3 id="pwtitle" class="modal-title" trspan="enterPassword" /> |
| 171 |
<TMPL_IF NAME="INSTANCE_NAME"><h4><TMPL_VAR NAME="INSTANCE_NAME"></h4></TMPL_IF> |
| 172 |
</div> |
| 173 |
<div class="modal-body"> |
| 174 |
<div class="input-group maxw"> |
| 175 |
<label class="input-group-addon" id="mlabel" for="mdPwd" trspan="password"></label> |
| 176 |
<input id="mdPwd" class="form-control" ng-model="result" aria-describedby="mlabel"/> |
| 177 |
</div> |
| 178 |
</div> |
| 179 |
<div class="modal-footer"> |
| 180 |
<button class="btn btn-primary" id="passwordok" ng-click="ok()" trspan="ok" role="button"></button> |
| 181 |
<button class="btn btn-warning" ng-click="cancel()" trspan="cancel" role="button"></button> |
| 182 |
</div> |
| 183 |
</div> |
| 184 |
</script> |
| 185 |
|
| 186 |
<!-- Save confirm --> |
| 187 |
<script type="text/ng-template" id="save.html"> |
| 188 |
<div role="alertdialog" aria-labelledby="stitle" aria-describedby="sbody"> |
| 189 |
<div class="modal-header"> |
| 190 |
<h3 id="stitle" class="modal-title" trspan="savingConfirmation" /> |
| 191 |
<TMPL_IF NAME="INSTANCE_NAME"><h4><TMPL_VAR NAME="INSTANCE_NAME"></h4></TMPL_IF> |
| 192 |
</div> |
| 193 |
<div id="sbody" class="modal-body"> |
| 194 |
<div class="input-group maxw"> |
| 195 |
<label id="slabel" class="input-group-addon" for="longtextinput" trspan="cfgLog"></label> |
| 196 |
<textarea id="longtextinput" rows="5" class="form-control" ng-model="result" aria-describedby="slabel"></textarea> |
| 197 |
</div> |
| 198 |
</div> |
| 199 |
<div class="modal-footer"> |
| 200 |
<button class="btn btn-primary" id="saveok" ng-click="ok()" trspan="ok" role="button"></button> |
| 201 |
<button class="btn btn-warning" ng-click="cancel()" trspan="cancel" role="button"></button> |
| 202 |
</div> |
| 203 |
</div> |
| 204 |
</script> |
| 205 |
|
| 206 |
<TMPL_INCLUDE NAME="scripts.tpl"> |
| 207 |
|
| 208 |
<!-- //if:jsminified |
| 209 |
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/conftree.min.js"></script> |
| 210 |
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/filterFunctions.min.js"></script> |
| 211 |
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/manager.min.js"></script> |
| 212 |
//else --> |
| 213 |
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/conftree.js"></script> |
| 214 |
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/filterFunctions.js"></script> |
| 215 |
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">js/manager.js"></script> |
| 216 |
<!-- //endif --> |
| 217 |
|
| 218 |
<TMPL_INCLUDE NAME="footer.tpl"> |