<?php /* @var PermissaoAtividadeForm $atividade */ ?> <h4>Permissões da Página de Atividades</h4> <div class="input"> <?php echo $form->labelEx($atividade, 'informacoes'); ?> <?php echo $form->dropDownList($atividade, 'informacoes', Grupo::defaultPermitions()); ?> <?php echo $form->error($atividade, 'informacoes'); ?> </div> <div class="input"> <?php echo $form->labelEx($atividade, 'deletar'); ?> <?php echo $form->dropDownList($atividade, 'deletar', Grupo::binaryPermitions()); ?> <?php echo $form->error($atividade, 'deletar'); ?> </div>
<?php echo $form->dropDownList($acervo, 'links', Grupo::binaryPermitions()); ?> <?php echo $form->error($acervo, 'links'); ?> </div> <div class="input"> <?php echo $form->labelEx($acervo, 'subscriptions'); ?> <?php echo $form->dropDownList($acervo, 'subscriptions', Grupo::binaryPermitions()); ?> <?php echo $form->error($acervo, 'subscriptions'); ?> </div> <div class="input"> <?php echo $form->labelEx($acervo, 'contatos'); ?> <?php echo $form->dropDownList($acervo, 'contatos', Grupo::binaryPermitions()); ?> <?php echo $form->error($acervo, 'contatos'); ?> </div>
?> </td> </tr> <tr> <td>Acesso ao Gerencial</td> <td><?php echo $form->dropDownList($model->permissao, 'gerencial', Grupo::binaryPermitions()); ?> </td> </tr> <tr> <td>Deleção</td> <td><?php echo $form->dropDownList($model->permissao, 'deletar', Grupo::binaryPermitions()); ?> </td> </tr> <?php /* <?php foreach($model->getRubricas() as $key=>$rubrica):?> <tr> <td><?php echo $rubrica['nome']?></td> <td> <?php echo CHtml::dropDownList('PermissaoProjeto[rubricas][]', $rubrica['cod_rubrica'], PermissaoProjeto::listPermitionData())?> </td> </tr> <?php endforeach;?> */
echo $form->dropDownList($pessoa, 'atividades', Grupo::defaultPermitions()); ?> <?php echo $form->error($pessoa, 'atividades'); ?> </div> <div class="input"> <?php echo $form->labelEx($pessoa, 'financeiro'); ?> <?php echo $form->dropDownList($pessoa, 'financeiro', Grupo::binaryPermitions()); ?> <?php echo $form->error($pessoa, 'financeiro'); ?> </div> <div class="input"> <?php echo $form->labelEx($pessoa, 'deletar'); ?> <?php echo $form->dropDownList($pessoa, 'deletar', Grupo::binaryPermitions()); ?> <?php echo $form->error($pessoa, 'deletar'); ?> </div>
echo CHtml::link("Editar Projeto", array('/projeto/update', 'id' => $model->cod_projeto), array('class' => 'btn btn-primary btn-small')); ?> </td></tr> </table> <h4>Permissões Individuais</h4> <div class="well"> <?php echo CHtml::link("Adicionar Permissão", array('projeto/permissoes', 'id' => $model->cod_projeto), array('class' => 'btn btn-primary btn-small')); ?> <dl class="dl-horizontal"> <?php $defaultPermitions = Grupo::defaultPermitions(); $binaryPermitions = Grupo::binaryPermitions(); ?> <?php foreach ($permissoes as $p) { ?> <dt><b><?php echo $p->pessoa->nome; ?> </b></dt> <?php $perm = json_decode($p->permissao); ?> <dd> <b>Informações:</b> <?php echo $defaultPermitions[$perm->informacoes];
?> <?php echo $form->dropDownList($gerencial, 'categoria_atividade', Grupo::binaryPermitions()); ?> <?php echo $form->error($gerencial, 'categoria_atividade'); ?> </div> <div class="input"> <?php echo $form->labelEx($gerencial, 'permissoes'); ?> <?php echo $form->dropDownList($gerencial, 'permissoes', Grupo::binaryPermitions()); ?> <?php echo $form->error($gerencial, 'permissoes'); ?> </div> <div class="input"> <?php echo $form->labelEx($gerencial, 'relatorios'); ?> <?php echo $form->dropDownList($gerencial, 'relatorios', Grupo::binaryPermitions()); ?> <?php echo $form->error($gerencial, 'relatorios'); ?> </div>
echo CHtml::dropDownList("Rubrica", null, $data, array('id' => 'rubrica_id')); ?> <br> <?php echo CHtml::dropDownList("RubricaPermissao", null, Grupo::binaryPermitions(), array('id' => 'rubrica_permissao')); ?> <br> <?php echo CHtml::button("Adicionar", array('class' => 'btn btn-small', 'id' => 'rubrica_add')); ?> <br> <table class="table" id="rubrica_added" style="margin-top: 10px;"> <tr><th>Rubrica</th><th>Permissão</th><th></th></tr> <?php $permition = Grupo::binaryPermitions(); ?> <?php if (isset($projeto->rubricas)) { ?> <?php foreach ($projeto->rubricas as $r) { ?> <?php $rubrica = json_decode($r); ?> <tr id="perm_rubrica_<?php echo $rubrica->cod_rubrica; ?> "> <td><?php