Galerie: úpravy vzhledu a mam-org-only bloků
This commit is contained in:
		
							parent
							
								
									d289d165ef
								
							
						
					
					
						commit
						1f0ba770b3
					
				
					 3 changed files with 66 additions and 43 deletions
				
			
		|  | @ -6,6 +6,10 @@ Galerie {{galerie.nazev}} | ||||||
| 
 | 
 | ||||||
| {% block content %} | {% block content %} | ||||||
| 
 | 
 | ||||||
|  |   {% if galerie.zobrazit > 0 %} | ||||||
|  |     <div class="mam-org-only"> | ||||||
|  |   {% endif %} | ||||||
|  | 
 | ||||||
|   <h2> |   <h2> | ||||||
|     {% for g in cesta %} |     {% for g in cesta %} | ||||||
|       {% if not forloop.last %} |       {% if not forloop.last %} | ||||||
|  | @ -19,7 +23,7 @@ Galerie {{galerie.nazev}} | ||||||
|   {% if not obrazky %} |   {% if not obrazky %} | ||||||
|    <div class="galerie_hlavicka"> |    <div class="galerie_hlavicka"> | ||||||
|     {% if galerie.titulni_obrazek %} |     {% if galerie.titulni_obrazek %} | ||||||
|       <img src="{{ galerie.titulni_obrazek.obrazek_stredni.url }}" style="border: 1px solid black;"> |       <img src="{{ galerie.titulni_obrazek.obrazek_stredni.url }}" class="titulni_obrazek"> | ||||||
|     {% endif %} |     {% endif %} | ||||||
|    </div> |    </div> | ||||||
|   {% endif %} |   {% endif %} | ||||||
|  | @ -45,8 +49,8 @@ Galerie {{galerie.nazev}} | ||||||
|             {% if galerie.titulni_obrazek %} |             {% if galerie.titulni_obrazek %} | ||||||
|             {% with galerie.titulni_obrazek.obrazek_maly as obrazek %} |             {% with galerie.titulni_obrazek.obrazek_maly as obrazek %} | ||||||
|             <img src="{{ obrazek.url }}" |             <img src="{{ obrazek.url }}" | ||||||
|                 width="{{ obrazek.width }}" |                 width="{% widthratio obrazek.width 167 obrazek.width %}" | ||||||
|                 height="{{ obrazek.height }}" /> |                 height="{% widthratio obrazek.width 167 obrazek.height %}" /> | ||||||
|             {% endwith %} |             {% endwith %} | ||||||
|             {% endif %} |             {% endif %} | ||||||
|             <div> |             <div> | ||||||
|  | @ -103,4 +107,9 @@ Galerie {{galerie.nazev}} | ||||||
|       </div> |       </div> | ||||||
|     {% endif %} |     {% endif %} | ||||||
|   {% endif %} |   {% endif %} | ||||||
|  | 
 | ||||||
|  |   {% if galerie.zobrazit > 0 %} | ||||||
|  |     </div> {# mam-org-only #} | ||||||
|  |   {% endif %} | ||||||
|  | 
 | ||||||
| {% endblock content %} | {% endblock content %} | ||||||
|  |  | ||||||
|  | @ -18,6 +18,15 @@ body { | ||||||
|   border: orange 2px dashed; |   border: orange 2px dashed; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | .mam-org-only .mam-org-only { | ||||||
|  |     border: 0px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | li.mam-org-only { | ||||||
|  |     padding: 3px 0px; | ||||||
|  |     margin: -2px 0px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| table .border-r { | table .border-r { | ||||||
|   border-right: solid 1px; |   border-right: solid 1px; | ||||||
| } | } | ||||||
|  | @ -446,7 +455,8 @@ div.zadani_azad_termin { | ||||||
| /* galerie */ | /* galerie */ | ||||||
| 
 | 
 | ||||||
| /* velká fotka */ | /* velká fotka */ | ||||||
| .galerie .obrazek { | /* zmenšování spolu s oknem prohlížeče */ | ||||||
|  | .galerie .obrazek, .titulni_obrazek { | ||||||
|     max-width: 100%; |     max-width: 100%; | ||||||
|     height: auto; |     height: auto; | ||||||
|     width: auto\9; /* ie8 */ |     width: auto\9; /* ie8 */ | ||||||
|  | @ -482,7 +492,6 @@ div.zadani_azad_termin { | ||||||
| .galerie { | .galerie { | ||||||
|   position: relative; |   position: relative; | ||||||
|   text-align: center; |   text-align: center; | ||||||
|   /*width: 100%;*/ |  | ||||||
|   margin: 20px auto 0 auto; |   margin: 20px auto 0 auto; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -503,6 +512,11 @@ div.zadani_azad_termin { | ||||||
|   text-align: center; |   text-align: center; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /* titulní obrázek hlavní galerie soustředění */ | ||||||
|  | .titulni_obrazek { | ||||||
|  |     border: 1px solid black; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| .galerie_nahledy{ | .galerie_nahledy{ | ||||||
|   /*margin: 1em 0;*/ |   /*margin: 1em 0;*/ | ||||||
|   margin: 0 auto 30px auto; |   margin: 0 auto 30px auto; | ||||||
|  |  | ||||||
|  | @ -21,13 +21,10 @@ | ||||||
|   {# Projdi vsechna soustredeni #} |   {# Projdi vsechna soustredeni #} | ||||||
|   {% for soustredeni in object_list %} |   {% for soustredeni in object_list %} | ||||||
|     {# Kdyz je verejne -> zobraz #} |     {# Kdyz je verejne -> zobraz #} | ||||||
|     {% if soustredeni.verejne_db or user.is_authenticated %} |     {% if soustredeni.verejne_db or user.is_staff %} | ||||||
|       {% if not soustredeni.verejne_db and user.is_authenticated %} |       {% if not soustredeni.verejne_db and user.is_staff %} | ||||||
|         Groups of user: {{user.groups.all}} <br> |         <div class="mam-org-only"> | ||||||
|         <!-- TODO pri prihlasovani ucastniku dodelat prava |         <!--Groups of user: {{user.groups.all}} <br>--> | ||||||
|         jen na group org ve view --> |  | ||||||
|         Toto soustředění není veřejné, vidíte ho jen proto, |  | ||||||
|         že jste přihlášení. <br> |  | ||||||
|       {% endif %} |       {% endif %} | ||||||
|       {# misto soustredeni TODO upravit#} |       {# misto soustredeni TODO upravit#} | ||||||
|       <h2> |       <h2> | ||||||
|  | @ -42,7 +39,7 @@ | ||||||
|         {% if soustredeni.galerie_set.all %} |         {% if soustredeni.galerie_set.all %} | ||||||
|           {% for galerie in soustredeni.galerie_set.all %} |           {% for galerie in soustredeni.galerie_set.all %} | ||||||
|             {% if galerie.zobrazit == 0 or user.is_staff %} |             {% if galerie.zobrazit == 0 or user.is_staff %} | ||||||
|         <li> |               <li {% if galerie.zobrazit > 0 and user.is_staff %}class="mam-org-only"{% endif %}> | ||||||
|                 <a href="../{{soustredeni.pk}}/fotogalerie/{{galerie.pk}}">Fotogalerie</a> |                 <a href="../{{soustredeni.pk}}/fotogalerie/{{galerie.pk}}">Fotogalerie</a> | ||||||
|                 {# TODO kdyz je titulni obrazek, tak asi i titulni obrazek #} |                 {# TODO kdyz je titulni obrazek, tak asi i titulni obrazek #} | ||||||
|               </li> |               </li> | ||||||
|  | @ -73,6 +70,9 @@ | ||||||
|         {% endfor %} |         {% endfor %} | ||||||
|         </ul> |         </ul> | ||||||
|       {% endif %} |       {% endif %} | ||||||
|  |       {% if not soustredeni.verejne_db and user.is_staff %} | ||||||
|  |         </div> {# class="mam-org-only" #} | ||||||
|  |       {% endif %} | ||||||
|     {% endif %} |     {% endif %} | ||||||
|     {% empty %} |     {% empty %} | ||||||
|       Žádná soustředění zatím neproběhla! |       Žádná soustředění zatím neproběhla! | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Matěj Kocián
						Matěj Kocián