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 */ | /* Barvy korektur */ | ||||||
| [data-opravastatus="k_oprave"] { | [data-opravastatus="k_oprave"] { | ||||||
| 	--rgb: 255, 0, 0; | 	--rgb: 255, 0, 0; | ||||||
|  | 
 | ||||||
|  | 	[value="k_oprave"] { display: none } | ||||||
|  | 	[value="notcomment"] { display: none } | ||||||
| } | } | ||||||
| [data-opravastatus="opraveno"] { | [data-opravastatus="opraveno"] { | ||||||
| 	--rgb: 0, 0, 255; | 	--rgb: 0, 0, 255; | ||||||
|  | 
 | ||||||
|  | 	[value="opraveno"] { display: none } | ||||||
|  | 	[value="comment"] { display: none } | ||||||
| } | } | ||||||
| [data-opravastatus="neni_chyba"] { | [data-opravastatus="neni_chyba"] { | ||||||
| 	--rgb: 128, 128, 128; | 	--rgb: 128, 128, 128; | ||||||
|  | 
 | ||||||
|  | 	[value="neni_chyba"] { display: none } | ||||||
|  | 	[value="comment"] { display: none } | ||||||
| } | } | ||||||
| [data-opravastatus="k_zaneseni"] { | [data-opravastatus="k_zaneseni"] { | ||||||
| 	--rgb: 0, 255, 0; | 	--rgb: 0, 255, 0; | ||||||
|  | 
 | ||||||
|  | 	[value="k_zaneseni"] { display: none } | ||||||
|  | 	[value="notcomment"] { display: none } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| [data-opravazobrazit="false"] { | [data-opravazobrazit="false"] { | ||||||
|  |  | ||||||
|  | @ -32,37 +32,26 @@ | ||||||
| 					<button style="display: none" type='submit' name='action' value='del' title='Smaž opravu'> | 					<button style="display: none" type='submit' name='action' value='del' title='Smaž opravu'> | ||||||
|             <img src="{% static "korektury/imgs/delete.png"%}"/> |             <img src="{% static "korektury/imgs/delete.png"%}"/> | ||||||
| 					</button> | 					</button> | ||||||
|             {% if o.status != o.STATUS.K_OPRAVE %} |  | ||||||
|               <button type='submit' name='action' value='{{ o.STATUS.K_OPRAVE }}' title='Označ jako neopravené'> |               <button type='submit' name='action' value='{{ o.STATUS.K_OPRAVE }}' title='Označ jako neopravené'> | ||||||
|             <img src="{% static "korektury/imgs/undo.png"%}"/> |             <img src="{% static "korektury/imgs/undo.png"%}"/> | ||||||
| 					</button> | 					</button> | ||||||
|             {% endif %} |  | ||||||
|             {% if o.status != o.STATUS.OPRAVENO %} |  | ||||||
|               <button type='submit' name='action' value='{{ o.STATUS.OPRAVENO }}' title='Označ jako opravené'> |               <button type='submit' name='action' value='{{ o.STATUS.OPRAVENO }}' title='Označ jako opravené'> | ||||||
|             <img src="{% static "korektury/imgs/check.png"%}"/> |             <img src="{% static "korektury/imgs/check.png"%}"/> | ||||||
| 					</button> | 					</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'> |               <button type='submit' name='action' value='{{ o.STATUS.NENI_CHYBA }}' title='Označ, že se nebude měnit'> | ||||||
|             <img src="{% static "korektury/imgs/cross.png" %}"/> |             <img src="{% static "korektury/imgs/cross.png" %}"/> | ||||||
| 					</button> | 					</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í'> |               <button type='submit' name='action' value='{{ o.STATUS.K_ZANESENI }}' title='Označ jako připraveno k zanesení'> | ||||||
|             <img src="{% static "korektury/imgs/tex.png" %}"/> |             <img src="{% static "korektury/imgs/tex.png" %}"/> | ||||||
| 					</button> | 					</button> | ||||||
|             {% endif %} |  | ||||||
| 				</form> | 				</form> | ||||||
| 
 | 
 | ||||||
|           {% if o.status == 'opraveno' or o.status == 'neni_chyba'  %} |             <button type='button' value="notcomment" title='Korekturu nelze komentovat, protože už je uzavřená'> | ||||||
|             <button type='button' title='Korekturu nelze komentovat, protože už je uzavřená'> |  | ||||||
|           <img src="{% static "korektury/imgs/comment-gr.png" %}"/> |           <img src="{% static "korektury/imgs/comment-gr.png" %}"/> | ||||||
| 				</button> | 				</button> | ||||||
|           {% else %} |             <button type='button' value="comment" onclick='box_edit("op{{o.id}}", "comment");' title='Komentovat'> | ||||||
|             <button type='button' onclick='box_edit("op{{o.id}}", "comment");' title='Komentovat'> |  | ||||||
|           <img src="{% static "korektury/imgs/comment.png" %}"/> |           <img src="{% static "korektury/imgs/comment.png" %}"/> | ||||||
| 				</button> | 				</button> | ||||||
|           {% endif %} |  | ||||||
| 
 | 
 | ||||||
| 				</span> | 				</span> | ||||||
| 				<button type='button' onclick='toggle_visibility(this.parentElement.parentElement.parentElement);' title='Skrýt/Zobrazit'> | 				<button type='button' onclick='toggle_visibility(this.parentElement.parentElement.parentElement);' title='Skrýt/Zobrazit'> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue