User menu, css cleanups
This commit is contained in:
1 parent
9641b66346
commit
d8a750151b
9 files changed
+3185
-2736
No files matched your search
@@ -128,6 +128,13 @@ class UserProfile(models.Model):
|
||||
else:
|
||||
return datetime.min
|
||||
|
||||
def profile_image_url(self):
|
||||
from django.templatetags.static import static
|
||||
if self.image:
|
||||
return static('img/unknown_person.png')
|
||||
|
||||
return self.image
|
||||
|
||||
def __unicode__(self):
|
||||
return u"{0}".format(self.user)
|
||||
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
+30
-15
@@ -6,10 +6,30 @@
|
||||
@import "datepicker";
|
||||
|
||||
body {
|
||||
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
.glyphicon .white {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
#header {
|
||||
.dropdown-toggle {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
|
||||
img {
|
||||
width: 40px;
|
||||
@include border-radius(50% 50%);
|
||||
}
|
||||
.name {
|
||||
display: inline-block;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#customer {
|
||||
ul {
|
||||
@@ -140,20 +160,6 @@ body {
|
||||
}
|
||||
}
|
||||
}
|
||||
/* General styles*/
|
||||
.glyphicon .white {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
.form-login {
|
||||
max-width: 320px;
|
||||
margin: 4em auto;
|
||||
[type=submit] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
#footer .credits {
|
||||
text-align: center;
|
||||
margin: 2em;
|
||||
@@ -175,3 +181,12 @@ body {
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
.form-login {
|
||||
max-width: 320px;
|
||||
margin: 4em auto;
|
||||
[type=submit] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
Whitespace-only changes.
Whitespace-only changes.
+3147
-2716
File diff suppressed because it is too large.
Load diff
@@ -6,10 +6,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="x-django-static-url" content="{{ STATIC_URL }}">
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}stylesheets/screen.css" type="text/css" media="screen, projection">
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}stylesheets/print.css" type="text/css" media="print">
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="{{ STATIC_URL }}stylesheets/ie.css" type="text/css" media="screen, projection">
|
||||
<![endif]-->
|
||||
{%block headinc %}
|
||||
{%endblock%}
|
||||
</head>
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
<li><a href="{% url 'login' %}">Logg inn</a></li>
|
||||
{% else %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Innstillinger <b class="caret"></b></a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="{{ user.get_profile.profile_image_url }}" /><span class="name">{{ user.first_name }}</span> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="{% if active = "create_user" %}active{% endif %}"><a href="{% url 'create-user' %}"><i class="glyphicon glyphicon-plus"></i> Ny bruker</a></li>
|
||||
{% if request.user.is_superuser %}<li><a href="/admin"><i class="glyphicon glyphicon-cog"></i> Administrasjon</a></li>{% endif %}
|
||||
|
||||
Reference in new issue
Block a user