Browse Source

Merge branch 'master' of atrey:/akce/MaM/MaMweb/mamweb

* 'master' of atrey:/akce/MaM/MaMweb/mamweb:
  První hrubý nástřel vzhledu.
  organizatori | zapomenuty vypis
  organizatori | admin | zobrazeni bezejmennych orgu
  organizatori | admin | oprava zobrazovani "" navic
  organizatori | admin | actions
  organizatori | admin | list_display
remotes/origin/vysl
Tomas Gavenciak 10 years ago
parent
commit
b134b5a297
  1. 128
      mamweb/static/css/mamweb.css
  2. BIN
      mamweb/static/images/logocb.png
  3. 44
      mamweb/templates/base.html
  4. 4
      mamweb/templates/menu.html
  5. 34
      seminar/admin.py
  6. 2
      seminar/templates/seminar/zadani/submenu.html

128
mamweb/static/css/mamweb.css

@ -1,6 +1,8 @@
.header {
font-size: 200%;
background: #ea3;
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,400,300,600&subset=latin,latin-ext);
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
.org-logged-in .mam-text-plugin {
@ -39,4 +41,124 @@ table .border-b {
height: 6em;
}
/* Headline & Header */
#headline {
padding: 6px 10px;
font-size: 150%;
font-weight: 400;
background: #00c322; /* @mamgreen */
}
#header {
position: relative;
z-index: -1;
}
.header-lg {
font-size: 250%;
background-color: rgba(255,195,0,0.8);
height: 220px;
position: relative;
}
.header-md {
font-size: 250%;
background-color: rgba(255,195,0,0.8);
height: 220px;
position: relative;
}
#header img.logo {
position: absolute;
top: 25px;
left: 25px;
height: 110px;
}
#header h1 {
font-size: 130%;
position: absolute;
top: 125px;
left: 30px;
height: 110px;
}
#header img.header {
margin: -25px 20px 0px 0px;
height: 145px;
float: right;
visibility: hidden;
}
/* Menu */
#menu {
background: #00c322; /* @mamgreen */
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
#menu ul {
padding: 0px;
margin: 0px;
}
#menu li {
display: inline-block;
border-radius: 0px;
padding: 0px;
width: 16.66%;
min-width: 140px;
text-align: center;
font-size: 150%;
font-weight: 400;
font-variant: small-caps;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
#menu a {
display: block;
padding: 8px 10px;
color: black;
}
#menu a:hover {
background: #ffb000;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
text-decoration: none;
}
#submenu {
/*border: 1px solid black;*/
}
#submenu ul {
padding: 0px 0px;
margin: 20px 0px 20px 0px;
background: #00c322; /* @mamgreen */
border-radius: 8px;
list-style-position: inside;
width: 100%;
}
#submenu li {
border-radius: 0px;
padding: 6px 15px;
margin-right: 0px;
font-size: 120%;
}
#submenu li:hover {
background: #ffb000;
}
#submenu li:first-child {
border-top-left-radius: 7px;
border-top-right-radius: 7px;
padding-top: 8px;
}
#submenu li:last-child {
border-bottom-left-radius: 7px;
border-bottom-right-radius: 7px;
padding-bottom: 8px;
}
#submenu li>a {
color: #000;
}
#submenu li>a:hover {
text-decoration: none;
}

BIN
mamweb/static/images/logocb.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

44
mamweb/templates/base.html

@ -30,16 +30,46 @@
{% endif %}
</div>
<div class="container">
<div class='header'>
<a href="/">Korespondenční seminář M&amp;M</a>
<div class='row'>
<div class='col-md-12'>
<div id="headline">
Studentský korespondenční seminář a časopis MFF UK
</div>
</div>
</div>
<div class='row'>
<div class='col-md-12'>
<div id="header">
<div class='header-lg visible-lg-block'>
<img class="logo" src="{% static 'images/logocb.png' %}" />
<h1>Nadpis 1. úrovně</h1>
<img class="header" src="{% static 'images/liska6.png' %}" />
<!--<a href="/">Korespondenční seminář M&amp;M</a>-->
</div>
<div class='header-md visible-md-block'>
<img class="logo" src="{% static 'images/logocb.png' %}" />
<h1>Nadpis 1. úrovně</h1>
<img class="header" src="{% static 'images/liska6.png' %}" />
<!--<a href="/">Korespondenční seminář M&amp;M</a>-->
</div>
</div>
</div>
</div>
<div class='row'>
<div class='col-md-4' style=''>
{% include "menu.html" %}
{% block submenu %}
{% endblock %}
<div class='col-md-12' style=''>
<div id='menu'>
{% include "menu.html" %}
</div>
</div>
</div>
<div class='row'>
<div class='col-md-3'>
<div id='submenu'>
{% block submenu %}
{% endblock %}
</div>
</div>
<div class='col-md-8'>
<div class='col-md-9'>
{% block content %}
{% endblock content %}
</div>

4
mamweb/templates/menu.html

@ -1,15 +1,13 @@
{% load i18n cache mam_menu %}
{% aktualni_rocniky as rs %}
<h2> MENU </h2>
<ul>
<li><a href="/co-je-MaM/uvod/">Co je M&amp;M</a>
<li><a href="{% url 'seminar_seznam_soustredeni' %}">Soustředění</a>
<li><a href="/zadani/aktualni/">Zadání</a>
<li><a href="/clanky/uvod/">Články</a>
<li><a href="/archiv/cisla/">Archiv</a>
<!-- <li><a href="/odevzdat-reseni/muj-ucet">Odeslat řešení</a>-->
<li><a href="/odevzdat-reseni/muj-ucet">Odeslat řešení</a>
</ul>
<!-- TODO smazat <ul>

34
seminar/admin.py

@ -346,7 +346,41 @@ admin.site.register(Novinky, NovinkyAdmin)
### Organizator
def jmeno_organizatora(obj):
''' vraci jmeno organizatora '''
jmeno = obj.user.first_name
if obj.prezdivka:
jmeno = jmeno + ' "' + obj.prezdivka + '"'
jmeno = jmeno + ' ' + obj.user.last_name
if jmeno == ' ': # zobrazeni bezejmennych orgu
return 'org'
return jmeno
jmeno_organizatora.short_description = 'Jméno organizátora'
def je_organizator_aktivni(obj):
''' zjisti, zda-li je organizator aktivni '''
return obj.user.is_active
je_organizator_aktivni.short_description = 'Aktivní'
je_organizator_aktivni.boolean = True
def zaktivovat_organizatory(modeladmin, request, queryset):
''' vybrane organizatory oznaci jako aktivni '''
for org in queryset:
org.user.is_active = True
org.user.save()
zaktivovat_organizatory.short_description = 'Zaktivovat organizátory'
def deaktivovat_organizatory(modeladmin, request, queryset):
''' deaktivuje vybrane organizatory '''
for org in queryset:
org.user.is_active = False
org.user.save()
deaktivovat_organizatory.short_description = 'Deaktivovat organizátory'
@admin.register(Organizator)
class OrganizatorAdmin(admin.ModelAdmin):
list_filter = ['organizuje_do_roku']
list_display = [jmeno_organizatora, je_organizator_aktivni,]
actions = [zaktivovat_organizatory, deaktivovat_organizatory,]

2
seminar/templates/seminar/zadani/submenu.html

@ -4,7 +4,7 @@
<li><a href="{{cesta}}/aktualni-zadani/">Aktuální zadání</a>
<li><a href="{{cesta}}/ulohy/">Úlohy</a>
<li><a href="{{cesta}}/temata/">Témata</a>
<li><a href="{{cesta}}/aktualni-cislo/">Aktuální Číslo</a>
<li><a href="{{cesta}}/aktualni-cislo/">Aktuální číslo</a>
<li><a href="{{cesta}}/vysledkove-listiny/">Výsledkové listiny</a>
</ul>

Loading…
Cancel
Save