Skip to content
This repository was archived by the owner on Oct 28, 2019. It is now read-only.

Commit 909941c

Browse files
committed
Add a dummy preferences modal view
1 parent a7a059e commit 909941c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

pasteapp/templates/base.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
<i class="icon-wrench"></i> Admin
4141
</a></li>
4242
{% endif %}
43+
<li><a href="#settings" data-toggle="modal"><i
44+
class="icon-cogs"></i> Preferences</a></li>
4345
<li><a href="{% url logout %}">
4446
<i class="icon-signout"></i> Logout
4547
</a></li>
@@ -70,6 +72,42 @@
7072
</div>
7173
{% endblock %}
7274

75+
{% if request.user.is_authenticated %}
76+
<div class="modal fade" id="settings">
77+
<form action="" method="post" accept-charset="utf-8" class="form-horizontal" id="settings-form">
78+
<div class="modal-header">
79+
<button type="button" class="close" data-dismiss="modal">×</button>
80+
<h3>Preferences</h3>
81+
</div>
82+
83+
<div class="modal-body">
84+
<fieldset>
85+
<div class="control-group">
86+
<label class="control-label" for="id_username">Username</label>
87+
<div class="controls">
88+
<input type="text" class="input-xlarge"
89+
id="id_username" value="{{ user.username }}"
90+
disabled="disabled" />
91+
</div>
92+
</div>
93+
<div class="control-group">
94+
<label class="control-label" for="avatar">Avatar</label>
95+
<div class="controls">
96+
<img src="{% gravatar user.email 50 %}" class="avatar" />
97+
<a href="https://gravatar.com/">Change your avatar at Gravatar.com</a>.
98+
</div>
99+
</div>
100+
</fieldset>
101+
</div>
102+
103+
<div class="modal-footer">
104+
<a href="#" class="btn" data-dismiss="modal">Close</a>
105+
<a href="#" class="btn btn-primary" data-dismiss="modal">Save</a>
106+
</div>
107+
</form>
108+
</div>
109+
{% endif %}
110+
73111
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
74112
<script src="{{ STATIC_URL }}js/bootstrap.min.js" type="text/javascript"></script>
75113
{% if not request.user.is_authenticated %}

0 commit comments

Comments
 (0)