Zobrazení tlačítek podle atributu (ne v podle stavu v templatech)
This commit is contained in:
		
							parent
							
								
									00e0ed0a50
								
							
						
					
					
						commit
						ad2d1e676c
					
				
					 2 changed files with 14 additions and 13 deletions
				
			
		|  | @ -22,15 +22,27 @@ img{background:white;} | |||
| /* Barvy korektur */ | ||||
| [data-opravastatus="k_oprave"] { | ||||
| 	--rgb: 255, 0, 0; | ||||
| 
 | ||||
| 	[value="k_oprave"] { display: none } | ||||
| 	[value="notcomment"] { display: none } | ||||
| } | ||||
| [data-opravastatus="opraveno"] { | ||||
| 	--rgb: 0, 0, 255; | ||||
| 
 | ||||
| 	[value="opraveno"] { display: none } | ||||
| 	[value="comment"] { display: none } | ||||
| } | ||||
| [data-opravastatus="neni_chyba"] { | ||||
| 	--rgb: 128, 128, 128; | ||||
| 
 | ||||
| 	[value="neni_chyba"] { display: none } | ||||
| 	[value="comment"] { display: none } | ||||
| } | ||||
| [data-opravastatus="k_zaneseni"] { | ||||
| 	--rgb: 0, 255, 0; | ||||
| 
 | ||||
| 	[value="k_zaneseni"] { display: none } | ||||
| 	[value="notcomment"] { display: none } | ||||
| } | ||||
| 
 | ||||
| [data-opravazobrazit="false"] { | ||||
|  |  | |||
|  | @ -32,37 +32,26 @@ | |||
| 					<button style="display: none" type='submit' name='action' value='del' title='Smaž opravu'> | ||||
|             <img src="{% static "korektury/imgs/delete.png"%}"/> | ||||
| 					</button> | ||||
|             {% if o.status != o.STATUS.K_OPRAVE %} | ||||
|               <button type='submit' name='action' value='{{ o.STATUS.K_OPRAVE }}' title='Označ jako neopravené'> | ||||
|             <img src="{% static "korektury/imgs/undo.png"%}"/> | ||||
| 					</button> | ||||
|             {% endif %} | ||||
|             {% if o.status != o.STATUS.OPRAVENO %} | ||||
|               <button type='submit' name='action' value='{{ o.STATUS.OPRAVENO }}' title='Označ jako opravené'> | ||||
|             <img src="{% static "korektury/imgs/check.png"%}"/> | ||||
| 					</button> | ||||
|             {% endif %} | ||||
|             {% if o.status != o.STATUS.NENI_CHYBA %} | ||||
|               <button type='submit' name='action' value='{{ o.STATUS.NENI_CHYBA }}' title='Označ, že se nebude měnit'> | ||||
|             <img src="{% static "korektury/imgs/cross.png" %}"/> | ||||
| 					</button> | ||||
|             {% endif %} | ||||
|             {% if o.status != o.STATUS.K_ZANESENI %} | ||||
|               <button type='submit' name='action' value='{{ o.STATUS.K_ZANESENI }}' title='Označ jako připraveno k zanesení'> | ||||
|             <img src="{% static "korektury/imgs/tex.png" %}"/> | ||||
| 					</button> | ||||
|             {% endif %} | ||||
| 				</form> | ||||
| 
 | ||||
|           {% if o.status == 'opraveno' or o.status == 'neni_chyba'  %} | ||||
|             <button type='button' title='Korekturu nelze komentovat, protože už je uzavřená'> | ||||
|             <button type='button' value="notcomment" title='Korekturu nelze komentovat, protože už je uzavřená'> | ||||
|           <img src="{% static "korektury/imgs/comment-gr.png" %}"/> | ||||
| 				</button> | ||||
|           {% else %} | ||||
|             <button type='button' onclick='box_edit("op{{o.id}}", "comment");' title='Komentovat'> | ||||
|             <button type='button' value="comment" onclick='box_edit("op{{o.id}}", "comment");' title='Komentovat'> | ||||
|           <img src="{% static "korektury/imgs/comment.png" %}"/> | ||||
| 				</button> | ||||
|           {% endif %} | ||||
| 
 | ||||
| 				</span> | ||||
| 				<button type='button' onclick='toggle_visibility(this.parentElement.parentElement.parentElement);' title='Skrýt/Zobrazit'> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue