Start reworking user page
This commit is contained in:
parent
179ff9d7d4
commit
2e4b09fecd
@ -28,6 +28,8 @@ h1 {
|
|||||||
.ojuso-yellow { color: #f9db3c; }
|
.ojuso-yellow { color: #f9db3c; }
|
||||||
.ojuso-blue { color: #008ad5; }
|
.ojuso-blue { color: #008ad5; }
|
||||||
|
|
||||||
|
.mx-1 { margin-left: 10px; }
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LAYOUT
|
* LAYOUT
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% load avatar_tags %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
@ -10,10 +11,12 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
|
|
||||||
<h2>{{ object.username }}</h2>
|
<img src="{% avatar_url user %}">
|
||||||
{% if object.name %}
|
|
||||||
<p>{{ object.name }}</p>
|
{% if object.first_name and object.last_name %}
|
||||||
|
<h2>{{ object.first_name }} {{ object.last_name }} <i>({{ object.username }})</i></h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -22,13 +25,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<a class="btn btn-primary" href="{% url 'profile:update' %}" role="button">{% trans 'Change Name' %}</a>
|
<a class="btn btn-primary" href="{% url 'profile:update' %}">{% trans 'Change Name' %}</a>
|
||||||
<a class="btn btn-primary" href="" role="button">E-Mail</a>
|
<a class="btn btn-primary mx-1" href="{% url 'avatar_change' %}">Change Avatar</a>
|
||||||
<!-- Your Stuff: Custom user template urls -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End Action buttons -->
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,14 +4,22 @@
|
|||||||
{% block title %}{{ user.username }}{% endblock %}
|
{% block title %}{{ user.username }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ user.username }}</h1>
|
<div class="container">
|
||||||
<form class="form-horizontal" method="post" action="{% url 'profile:update' %}">
|
<div class="row">
|
||||||
{% csrf_token %}
|
<div class="col-sm-12">
|
||||||
{{ form|crispy }}
|
|
||||||
<div class="control-group">
|
<h1>{{ user.username }}</h1>
|
||||||
<div class="controls">
|
<form class="form-horizontal" method="post" action="{% url 'profile:update' %}">
|
||||||
<button type="submit" class="btn">Update</button>
|
{% csrf_token %}
|
||||||
</div>
|
{{ form|crispy }}
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<button type="submit" class="btn">Update</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -75,10 +75,8 @@
|
|||||||
<img src="{% avatar_url user %}" class="img-circle" width="40" height="40" style="position:relative;margin-right:5px"/><span>{{user}}</span>
|
<img src="{% avatar_url user %}" class="img-circle" width="40" height="40" style="position:relative;margin-right:5px"/><span>{{user}}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" style="padding-bottom:0px" aria-labelledby="navbarDropdown">
|
<ul class="dropdown-menu dropdown-menu-right" style="padding-bottom:0px" aria-labelledby="navbarDropdown">
|
||||||
<li><a href="{% url 'avatar_change' %}"><i class="fa fa-cog" aria-hidden="true"></i> Change Avatar</a></li>
|
<li><a href="{% url 'profile:detail' %}"><i class="fa fa-cog" aria-hidden="true"></i> {%trans 'Profile' %}</a></li>
|
||||||
<li><a href="{% url 'profile:detail' %}"><i class="fa fa-cog" aria-hidden="true"></i> Profile</a></li>
|
<li><a href="{% url 'auth_logout' %}"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans 'Logout' %}</a></li>
|
||||||
<li role="separator" style="margin-bottom:0px"></li>
|
|
||||||
<li><a class="dropdown-item no-hover" style="background-color:red;color:white;padding:0.5rem 1.5rem" href="{% url 'auth_logout' %}"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans 'Logout' %}</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user