Start reworking user page
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% load avatar_tags %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
@ -10,10 +11,12 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<h2>{{ object.username }}</h2>
|
||||
{% if object.name %}
|
||||
<p>{{ object.name }}</p>
|
||||
<img src="{% avatar_url user %}">
|
||||
|
||||
{% if object.first_name and object.last_name %}
|
||||
<h2>{{ object.first_name }} {{ object.last_name }} <i>({{ object.username }})</i></h2>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -22,13 +25,11 @@
|
||||
<div class="row">
|
||||
|
||||
<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="" role="button">E-Mail</a>
|
||||
<!-- Your Stuff: Custom user template urls -->
|
||||
<a class="btn btn-primary" href="{% url 'profile:update' %}">{% trans 'Change Name' %}</a>
|
||||
<a class="btn btn-primary mx-1" href="{% url 'avatar_change' %}">Change Avatar</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- End Action buttons -->
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -4,14 +4,22 @@
|
||||
{% block title %}{{ user.username }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ user.username }}</h1>
|
||||
<form class="form-horizontal" method="post" action="{% url 'profile:update' %}">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn">Update</button>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<h1>{{ user.username }}</h1>
|
||||
<form class="form-horizontal" method="post" action="{% url 'profile:update' %}">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user