mirror of https://github.com/interlegis/sapl.git
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							93 lines
						
					
					
						
							2.8 KiB
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							93 lines
						
					
					
						
							2.8 KiB
						
					
					
				| {% extends "materia/materialegislativa_detail.html" %} | |
| {% load i18n %} | |
| {% load crispy_forms_tags %} | |
| {% block actions %} {% endblock %} | |
| {% block detail_content %} | |
|   <fieldset> | |
|     <legend>Matéria Legislativa</legend> | |
|     <div class="row"> | |
|       <div class="col-md-4">Tipo: <b>{{object.tipo.sigla}}</b></div> | |
|       <div class="col-md-4">Número: <b>{{object.numero}}</b></div> | |
|       <div class="col-md-4">Ano: <b>{{object.ano}}</b></div> | |
|     </div> | |
|     Ementa: <b>{{object.ementa}}</b> | |
| 
 | |
|     <fieldset> | |
|       <legend>Autorias</legend> | |
|       <table> | |
|         <tr> | |
|           <th>Nome Autor</th> | |
|           <th>Tipo Autor</th> | |
|           <th>Primeiro Autor</th> | |
|           <th>Partido Autor</th> | |
|         </tr> | |
|           {% for a in autorias %} | |
|             <tr> | |
|               <td><a href="{% url 'autoria_edit' object.id a.autor.id %}">{{a.autor}}</a></td> | |
|               <td>{{a.autor.tipo.descricao}}</td> | |
|               <td>{{a.primeiro_autor|yesno:"Sim,Não"}}</td> | |
|               <td>{{a.partido.sigla|default_if_none:"Não Informado"}}</td> | |
|             </tr> | |
|           {% endfor %} | |
|       </table> | |
|     </fieldset> | |
| 
 | |
|     <fieldset> | |
|       <legend>Adicionar Autoria</legend> | |
|       <div class="row"> | |
|         <div class="col-md-3">Tipo do Autor</div> | |
|         <div class="col-md-3">Nome Autor</div> | |
|         <div class="col-md-3">Primeiro Autor</div> | |
|         <div class="col-md-3">Partido Autor</div> | |
|       </div> | |
|       <form method="POST"> | |
|         {% csrf_token %} | |
| 
 | |
|         <div class="row"> | |
|           <div class="col-md-3"> | |
|             <select name="tipo_autor" onChange="form.submit();"> | |
|               {% for tipo in tipo_autores %} | |
|               <option value="{{tipo.id}}" {% if tipo.id == tipo_autor_id %} selected {% endif %}> | |
|               {{tipo.descricao}} | |
|               </option> | |
|               {% endfor %} | |
|             </select> | |
|           </div> | |
| 
 | |
|           <div class="col-md-3"> | |
|             <select name="nome_autor"> | |
|               {% for a in autores %} | |
|               {% if a.tipo_id == tipo_autor_id %} | |
|               <option value="{{a.id}}"> | |
|               {{a}} | |
|               </option> | |
|               {% endif %} | |
|               {% endfor %} | |
|             </select> | |
|           </div> | |
| 
 | |
|           <div class="col-md-3"> | |
|             <select name="primeiro_autor"> | |
|               <option value="1">Sim</option> | |
|               <option value="0" selected>Não</option> | |
|             </select> | |
|           </div> | |
| 
 | |
|           <div class="col-md-3"> | |
|             <select name="partido_autor"> | |
|               {% for p in partido_autor %} | |
|                 {% if tipo_autor_id == 1 %} | |
|                   <option value="{{p.sigla}}"> | |
|                     {{p}} | |
|                   </option> | |
|                 {% endif %} | |
|               {% endfor %} | |
|             </select> | |
|           </div> | |
|         </div> | |
| 
 | |
|         <input type="submit" name="salvar" value="Salvar" class="button primary"> | |
|       </form> | |
|     </fieldset> | |
|   </fieldset> | |
| {% endblock %} |