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. 28
      mamweb/templates/base.html

25
mamweb/static/css/mamweb.css

@ -14,8 +14,31 @@ div.container {
margin: auto;
}
.org-logged-in div.container {
margin-top: 20px;
}
div.login-bar {
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 */
@ -123,6 +146,8 @@ h1 {
margin-top: 0px;
}
/* Comments */
#id_comment {

28
mamweb/templates/base.html

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

Loading…
Cancel
Save