Rev 1860 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1860 | Rev 1876 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | $scope.$apply(); |
75 | $scope.$apply(); |
76 | } |
76 | } |
77 | 77 | ||
78 | ); |
78 | ); |
79 | } |
79 | } |
- | 80 | ||
- | 81 | $scope.createRoles = function(department) |
|
- | 82 | { |
|
- | 83 | var d = JSON.stringify(department); |
|
- | 84 | ||
- | 85 | widgetCallWithActionParameters( |
|
- | 86 | "<%=request.getContextPath()%>/admin/adminDepartment.do", |
|
- | 87 | "createRolesForDeparment", |
|
- | 88 | { |
|
- | 89 | "courseDepartmentJson" : d |
|
- | 90 | }, |
|
- | 91 | ".form-horizontal", |
|
- | 92 | function(departmentJson) |
|
- | 93 | { |
|
- | 94 | window.location.reload(); |
|
- | 95 | } |
|
- | 96 | ||
- | 97 | ); |
|
- | 98 | } |
|
80 | $scope.removeDepartment = function(department,$index) |
99 | $scope.removeDepartment = function(department,$index) |
81 | { |
100 | { |
82 | 101 | ||
83 | var d = JSON.stringify(department); |
102 | var d = JSON.stringify(department); |
84 | widgetCallWithActionParameters( |
103 | widgetCallWithActionParameters( |
Line 116... | Line 135... | ||
116 | }); |
135 | }); |
117 | </script> |
136 | </script> |
118 | 137 | ||
119 | 138 | ||
120 | 139 | ||
121 | <p><label class="label-info">Papeis dos Departamentos:</label> Os papeis de departamento são escolhidos da lista de papeis do sistema considerando-se todos os papeis com os prefixos:</p> |
140 | <p><label class="label-info">Papeis dos Departamentos:</label> Os papeis de departamento são escolhidos da lista de papeis do sistema considerando-se todos os papeis com os prefixos:</p> |
122 | <ul> |
141 | <ul> |
123 | <li>department.board: para membros da direcção</li> |
142 | <li>department.board: para membros da direcção</li> |
124 | <li>department.diretor: para diretores direcção</li> |
143 | <li>department.diretor: para diretores direcção</li> |
125 | </ul> |
144 | </ul> |
126 | <p>Caso seja necessário um novo papel deverá administrar os papeis institucionais dirija-se <html:link action="/user/configurationUserRoles">Aqui</html:link></p> |
145 | <p>Caso seja necessário um novo papel deverá administrar os papeis institucionais dirija-se <html:link action="/user/configurationUserRoles">Aqui</html:link></p> |
127 | <button class="btn btn-default" data-toggle="collapse" data-target=".languageNames">Mostrar Campos Multinliguisticos</button> |
146 | <button class="btn btn-default" data-toggle="collapse" data-target=".languageNames">Mostrar Campos Multinliguisticos</button> |
128 | 147 | ||
129 | <button class="btn btn-success pull-right" ng-click="newDepartment()"><span class="glyphicon glyphicon-plus"/></button> |
148 | <button class="btn btn-success pull-right" ng-click="newDepartment()"><span class="glyphicon glyphicon-plus"/></button> |
130 | <div class="form-horizontal"> |
149 | <div class="form-horizontal"> |
131 | <div class="web-messages"></div> |
150 | <div class="web-messages"></div> |
Line 133... | Line 152... | ||
133 | <thead> |
152 | <thead> |
134 | <tr> |
153 | <tr> |
135 | <th>Identificador</th> |
154 | <th>Identificador</th> |
136 | <th>Trocar Para Identificador * </th> |
155 | <th>Trocar Para Identificador * </th> |
137 | <th>Ativo</th> |
156 | <th>Ativo</th> |
138 | <th>Instituição</th> |
157 | <th>Instituição</th> |
139 | <th style="width: 30%">Nome</th> |
158 | <th style="width: 30%">Nome</th> |
140 | <th>Papel para Membro da Direcao</th> |
159 | <th>Papel para Membro da Direcao</th> |
141 | <th>Papel para Director</th> |
160 | <th>Papel para Director</th> |
142 | <th></th> |
161 | <th></th> |
143 | <th></th> |
162 | <th></th> |
- | 163 | <th></th> |
|
144 | </tr> |
164 | </tr> |
145 | </thead> |
165 | </thead> |
146 | <tbody> |
166 | <tbody> |
147 | <tr ng-class="{dirty: d.dirty=='true'}" ng-repeat="d in departments | orderBy:name:false"> |
167 | <tr ng-class="{dirty: d.dirty=='true'}" ng-repeat="d in departments | orderBy:name:false"> |
148 | <td> |
168 | <td> |
Line 203... | Line 223... | ||
203 | </button> |
223 | </button> |
204 | </td> |
224 | </td> |
205 | <td> |
225 | <td> |
206 | <bacoTags:confirm msg="Tem a certeza que deseja remover o departamento {{d.name}}" targetFunction="angular.element($('#departmentsModule')).scope().removeDepartment({{d}},{{$index}});angular.element($('#departmentsModule')).scope().$apply();" btnClass="btn btn-danger btn-xs" icon="glyphicon glyphicon-remove"/> |
226 | <bacoTags:confirm msg="Tem a certeza que deseja remover o departamento {{d.name}}" targetFunction="angular.element($('#departmentsModule')).scope().removeDepartment({{d}},{{$index}});angular.element($('#departmentsModule')).scope().$apply();" btnClass="btn btn-danger btn-xs" icon="glyphicon glyphicon-remove"/> |
207 | </td> |
227 | </td> |
- | 228 | <td> |
|
- | 229 | <button ng-if="!d.directorRole && !d.boardRole" data-toggle="tooltip" data-title="Criar Roles para este departamento" type="button" class="btn btn-success btn-xs" ng-click="createRoles(d)"> |
|
- | 230 | <span class="glyphicon glyphicon-user"/> |
|
- | 231 | </button> |
|
- | 232 | </td> |
|
208 | 233 | ||
209 | 234 | ||
210 | 235 | ||
211 | </tr> |
236 | </tr> |
212 | </tbody> |
237 | </tbody> |
213 | </table> |
238 | </table> |
214 | <p class="label label-warning">* - A sigla é o identificador do departamento, altere a sigla apenas se perceber as suas implicações. Existem Classes no sistema que dependem da sigla do departamento, a sigla tem de ser unica</p> |
239 | <h2 class="label label-warning">* - A sigla é o identificador do departamento, altere a sigla apenas se perceber as suas implicações. Existem Classes no sistema que dependem da sigla do departamento, a sigla tem de ser unica</h2> |
- | 240 | <h2 class="label label-warning">* - A sigla apenas pode ser alterada se não houver docentes nem cursos a apontar para o departamento que pretende alterar</h2> |
|
215 | <%-- |
241 | <%-- |
216 | <model:id name="department" property="id"/> |
242 | <model:id name="department" property="id"/> |
217 | <model:field name="department" property="name"/> |
243 | <model:field name="department" property="name"/> |
218 | <model:field name="department" property="nameEn"/> |
244 | <model:field name="department" property="nameEn"/> |
219 | <model:field name="department" property="nameEs"/> |
245 | <model:field name="department" property="nameEs"/> |
220 | <model:field name="department" property="nameFr"/> |
246 | <model:field name="department" property="nameFr"/> |
221 | <model:remove name="department"/> |
247 | <model:remove name="department"/> |
222 | --%> |
248 | --%> |
223 | </div> |
249 | </div> |
224 | 250 | ||
225 | <pre> |
251 | <!--<pre> |
226 | {{departments | json}} |
252 | {{departments | json}} |
227 | </pre> |
253 | </pre>--> |
228 | <%-- DEBUG |
254 | <%-- DEBUG |
229 | <pre> |
255 | <pre> |
230 | {{departments | json}} |
256 | {{departments | json}} |
231 | </pre> |
257 | </pre> |
232 | <pre> |
258 | <pre> |
Line 236... | Line 262... | ||
236 | </div> |
262 | </div> |
237 | 263 | ||
238 | 264 | ||
239 | </div> |
265 | </div> |
240 | 266 | ||
241 | <p>* Atenção o identificador é a base dos papeis, deverá trocar também as chaves dos papeis na administração de papeis institucionais, procurando pelos papeis respectivos e alterando a sua chave para a nova sigla ou criando novos papeis</p> |
267 | <p>* Atenção o identificador é a base dos papeis, deverá trocar também as chaves dos papeis na administração de papeis institucionais, procurando pelos papeis respectivos e alterando a sua chave para a nova sigla ou criando novos papeis</p> |
242 | 268 | ||
243 | 269 | ||
244 | <% |
270 | <% |
245 | AbstractDao.getCurrentSession().getTransaction().commit(); |
271 | AbstractDao.getCurrentSession().getTransaction().commit(); |
246 | %> |
272 | %> |
247 | 273 |