rename sections
This commit is contained in:
@@ -94,6 +94,18 @@ def edit(mid):
|
||||
|
||||
edit_location = "page_settings"
|
||||
|
||||
if "section_titles" in request.form:
|
||||
groups_title = request.form["groups_title"]
|
||||
blog_title = request.form["blog_title"]
|
||||
icons_title = request.form["icons_title"]
|
||||
blinkies_title = request.form["blinkies_title"]
|
||||
stamps_title = request.form["stamps_title"]
|
||||
|
||||
db.execute("UPDATE member SET groups_title=(?), blog_title=(?), icons_title=(?), blinkies_title=(?), stamps_title=(?) WHERE id=(?)",(groups_title, blog_title, icons_title, blinkies_title, stamps_title, mid))
|
||||
db.commit()
|
||||
|
||||
edit_location = "page_settings"
|
||||
|
||||
if "file" in request.files:
|
||||
# here we are just saving the uploaded file to the icons folder.
|
||||
# we're not going hard on security because we expect there to only be 1 admin
|
||||
|
||||
@@ -213,7 +213,10 @@ form textarea{
|
||||
max-height:300px;
|
||||
overflow-y:scroll;
|
||||
}
|
||||
|
||||
.image-sections{
|
||||
margin-top:20px;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
|
||||
#mobile-nav{
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
</form>
|
||||
|
||||
<div class="heading">Public Page Settings</div>
|
||||
<p>Select which sections to show on this member's public page</p>
|
||||
<form method="post" id="page_settings">
|
||||
<p>Select which sections to show on this member's public page</p>
|
||||
<input type="checkbox" id="show_groups" name="show_groups" {% if member[15] %}checked{% endif %}>
|
||||
<label for="show_groups">Groups</label><br>
|
||||
<input type="checkbox" id="show_blog" name="show_blog" {% if member[11] %}checked{% endif %}>
|
||||
@@ -49,6 +49,23 @@
|
||||
<input type="submit" name="page_settings" value="Submit">
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Customize section titles. Leave blank to hide the heading bar for that section altogether.</p>
|
||||
<form method="post">
|
||||
<label for="groups_title">Groups</label>
|
||||
<input name="groups_title" id="groups_title" value="{{ member[20] }}"><br>
|
||||
<label for="blog_title">Blog</label>
|
||||
<input name="blog_title" id="blog_title" value="{{ member[16] }}"><br>
|
||||
<label for="icons_title">Icons</label>
|
||||
<input name="icons_title" id="icons_title" value="{{ member[17] }}"><br>
|
||||
<label for="blinkies_title">Blinkies</label>
|
||||
<input name="blinkies_title" id="blinkies_title" value="{{ member[18] }}"><br>
|
||||
<label for="stamps_title">Stamps</label>
|
||||
<input name="stamps_title" id="stamps_title" value="{{ member[19] }}"><br>
|
||||
<input type="submit" name="section_titles" value="Submit">
|
||||
</form>
|
||||
|
||||
{% if unjoined_groups or joined_groups %}
|
||||
<div class="heading">Manage groups</div>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{% if blog|length > 0 %}
|
||||
{% if not g.user and not blog_public_show %}
|
||||
{% else %}
|
||||
<div class="heading big">{{member[3]}}'s blog</div>
|
||||
{% if member[16] %}<div class="heading big">{{ member[16] }}</div>{% endif %}
|
||||
{% endif %}
|
||||
<div id="blog">
|
||||
{% for post in blog %}
|
||||
@@ -52,7 +52,7 @@
|
||||
{% endif %}
|
||||
|
||||
<!-- {% if groups|length > 0 %}
|
||||
<div class="heading big">Groups</div>
|
||||
<div class="heading big">{{ member[20] }}</div>
|
||||
{% for group in groups %}
|
||||
|
||||
{% endfor %}
|
||||
@@ -60,30 +60,36 @@
|
||||
|
||||
{% if member[13] %}
|
||||
{% if blinkies|length > 0 %}
|
||||
<div class="heading big">Blinkies</div>
|
||||
{% if member[18] %}<div class="heading big">{{ member[18] }}</div>{% endif %}
|
||||
<div class="image-section">
|
||||
{% for blinkie in blinkies %}
|
||||
<img class="blinkie" src="{{ url_for('static', filename='blinkies/'+blinkie[0]) }}">
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br class="clear" />
|
||||
|
||||
{% if member[14] %}
|
||||
{% if stamps|length > 0 %}
|
||||
<div class="heading big">Stamps</div>
|
||||
{% if member[19] %}<div class="heading big">{{ member[19] }}</div>{% endif %}
|
||||
<div class="image-section">
|
||||
{% for stamp in stamps %}
|
||||
<img class="stamp" src="{{ url_for('static', filename='stamps/'+stamp[0]) }}">
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br class="clear" />
|
||||
|
||||
{% if member[12] %}
|
||||
{% if all_icons|length > 1 %}
|
||||
<div class="heading big">Icons</div>
|
||||
{% if member[17] %}<div class="heading big">{{ member[17] }}</div>{% endif %}
|
||||
<div class="image-section">
|
||||
{% for i in all_icons %}
|
||||
<img class="icon" src="{{ url_for('static', filename='icons/'+i[0]) }}">
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br class="clear" />
|
||||
|
||||
Reference in New Issue
Block a user