Browse Source

lišta přihlášeného orga

middleware_test
Kateřina Čížková 5 years ago
parent
commit
45d857f27f
  1. 25
      mamweb/static/css/mamweb.css
  2. 10
      mamweb/templates/base.html

25
mamweb/static/css/mamweb.css

@ -14,8 +14,31 @@ div.container {
margin: auto; margin: auto;
} }
.org-logged-in div.container {
margin-top: 20px;
}
div.login-bar { div.login-bar {
background: #6a0043; background: #6a0043;
color: #fffbf6;
width: 100%;
position: fixed;
margin-top: -20px;
min-height: 20px;
z-index: 20;
padding-left: 5px;
padding-right: 5px;
}
div.login-bar div {
display: inline-block;
}
a.login-ref-admin {
display: inline;
color: inherit;
} }
/* odkazy a nadpisy */ /* odkazy a nadpisy */
@ -123,6 +146,8 @@ h1 {
margin-top: 0px; margin-top: 0px;
} }
/* Comments */ /* Comments */
#id_comment { #id_comment {

10
mamweb/templates/base.html

@ -36,21 +36,21 @@
</head> </head>
<body class='{% if user.is_staff %}org-logged-in{% endif %}'> <body class='{% if user.is_staff %}org-logged-in{% endif %}'>
<div class="container">
{% if user.is_staff %} {% if user.is_staff %}
<div class="login-bar" > <div class="login-bar" >
{% if view.object %} {% if view.object %}
Objekt {{ view.object }}: {{ view.object }} Objekt {{ view.object }}: {{ view.object }}
{% if view.object.admin_url %}<a href='{{ view.object.admin_url }}'>[admin]</a>{% endif %} {% if view.object.admin_url %}<a class="login-ref-admin" href='{{ view.object.admin_url }}'>[admin]</a>{% endif %}
{% endif %} {% endif %}
{% if flatpage %} {% if flatpage %}
Stránka <tt>{{ flatpage.url }}</tt> ({{ flatpage.title }}) <div class="login-bar-stránka"> Stránka <tt>{{ flatpage.url }}</tt> ({{ flatpage.title }})</div>
<a href='{% url 'admin:flatpages_flatpage_change' flatpage.id %}'>[admin]</a> <a class="login-ref-admin" href='{% url 'admin:flatpages_flatpage_change' flatpage.id %}'>[admin]</a>
{% endif %} {% endif %}
<a class="login-ref-admin" href='/admin'>[admin mainpage]</a>
</div> </div>
{% endif %} {% endif %}
<div class="container">
<div class='row'> <div class='row'>
<div class='col-md-12'> <div class='col-md-12'>

Loading…
Cancel
Save