anexarProcesso.html 4.03 KB

<div ng-controller="AnexarProcessoController as anexarProcessoController">
	<form name="anexarProcessoForm" novalidate autocomplete="off">

		<div id="widget-anexarProcesso" class="widget-box margin-bottom">
			<div class="widget-header">
				<h2 class="widget-title">
					<translate>ECM.LABEL.ANEXARPROCESSO</translate>
				</h2>

				<div class="widget-toolbar">
					<a href="#void" ng-click="closeWidget('widget-anexarProcesso')"> <i class="fa fa-close"></i>
					</a>
				</div>
			</div>
			<div class="widget-main clearfix">
				<div id="anexarProcessoEdit" class="page-content clearfix">

					<p>
						<small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small>
					</p>

					<br></br>

					<fieldset>
						<legend>
							<label ng-class="{'has-error' : anexarProcessoForm.$submitted && anexarProcessoVH.listaProcessoAnexado.length < 1}"> <translate>ECM.LABEL.PROCESSOS</translate> <span class='red'>*</span>
								<i ng-show="anexarProcessoForm.$submitted && anexarProcessoVH.listaProcessoAnexado.length < 1" class='fa fa-warning red'
								tooltip="{{$translate.instant('ECM.LABEL.PROCESSOS') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" tooltip-placement='top'></i>
							</label>
						</legend>


						<div class="row">

							<div class="col-md-8">
								<auto-complete ng-id="processo" numbers-only ng-label="ECM.LABEL.PROCESSO" ng-model="processo" ng-find="autoCompleteProcessoEmAndametoByNup(value)" ng-item="item.nup" />
							</div>


						</div>

						<div class="row">

							<div class="col-md-12">
								<div class="row">
									<div class="col-sm-12">
										<div class="panel panel-default">
											<div class="panel-heading clearfix">
												<button title="{{$translate.instant('LABEL.ADICIONAR')}}" alt="{{$translate.instant('LABEL.ADICIONAR')}}" class="btn btn-clear" ng-click="addAnexoProcesso()"
													ng-disabled="!processo.unidade.id" type="button">
													<i class="fa fa-plus-circle yellow-dark"></i>
													<translate>LABEL.ADICIONAR</translate>
													</a>
												</button>
											</div>
											<table class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														<th width="5%" class="text-center"></th>
														<th class="text-center"><translate>ECM.LABEL.PROCESSO</translate></th>
														<th class="text-center"><translate>LABEL.USUARIO</translate></th>
														<th class="text-center"><translate>LABEL.UNIDADE</translate></th>
														<th class="text-center"><translate>ECM.LABEL.DATACRIACAO</translate></th>

													</tr>
												</thead>
												<tbody>
													<tr ng-repeat="anexarProcesso in anexarProcessoVH.listaProcessoAnexado">
														<td class="text-center"><input type="radio" name="anexarProcessoChecked" ng-value="anexarProcesso" ng-model="$parent.anexarProcessoChecked" /></td>
														<td class="text-center">{{anexarProcesso.processoAnexado.nup}}</td>
														<td class="text-center">{{anexarProcesso.processoAnexado.unidade.nome}}</td>
														<td class="text-center">{{anexarProcesso.processoAnexado.autor.username}}</td>
														<td class="text-center">{{anexarProcesso.processoAnexadodataCriacao | date: 'dd/MM/yyyy HH:mm:ss' }}</td>
													</tr>
													<tr ng-hide="anexarProcessoVH.listaProcessoAnexado.length > 0">
														<td colspan="5" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>
								</div>
							</div>
						</div>
					</fieldset>

					<div class="row">
						<div class="col-md-12">
							<button class="btn btn-sm btn-primary" ng-click="saveOrUpdate()" type="button">
								<translate>LABEL.SALVAR</translate>
							</button>

							<button class="btn btn-sm btn-primary" ng-click="closeWidget('widget-anexarProcesso')" type="button">
								<translate>LABEL.CANCELAR</translate>
							</button>
						</div>
					</div>
				</div>
			</div>
		</div>

	</form>

</div>