1
1
Fork 0

ÚKLID TIME

dev
Jan Kužílek 5 years ago
parent 95b1abed30
commit 157e562bf3

@ -7,3 +7,8 @@
</ul> </ul>
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% macro management_gen_line(field, formfield) %}
<span class="show">{{ field }}</span>
<span class="edit">{{ formfield() }}{{ errors(formfield) }}</span>
{% endmacro %}

@ -0,0 +1,10 @@
{% extends 'layout/base.html' %}
{% block content %}
<div class="important_subwrap">
<section class="side_panel">
{% block sidebar %}{% endblock %}
</section>
{% block main_content %}{% endblock %}
</div>
{% endblock content %}

@ -0,0 +1,7 @@
{% extends 'layout/base_sidebar.html' %}
{% from '_includes.html' import render_tags with context %}
{% block sidebar %}
{{ render_tags() }}
{% endblock %}

@ -1,11 +1,6 @@
{% extends 'layout/base.html' %} {% extends 'layout/base_sidebar.html' %}
{% from '_includes.html' import render_sidenav with context %} {% from '_includes.html' import render_sidenav with context %}
{% block content %} {% block sidebar %}
<div class="important_subwrap">
<section class="side_panel">
{{ render_sidenav({"speedtest": ("Speedtest", "http://speedtest.cesnet.cz")}) }} {{ render_sidenav({"speedtest": ("Speedtest", "http://speedtest.cesnet.cz")}) }}
</section> {% endblock %}
{% block setting_content %}{% endblock %}
</div>
{% endblock content %}

@ -1,8 +1,8 @@
{% extends 'layout/settings.html' %} {% extends 'layout/settings.html' %}
{% from '_includes.html' import render_pagination with context %} {% from '_includes.html' import render_pagination with context %}
{% from "_formhelpers.html" import errors %} {% from "_formhelpers.html" import management_gen_line, errors %}
{% block setting_content %} {% block main_content %}
<section class="management_table manage_posts"> <section class="management_table manage_posts">
<table> <table>
<thead> <thead>
@ -18,24 +18,15 @@
</thead> </thead>
<tbody> <tbody>
{% for post in posts %} {% for post in posts %}
<tr>
<form action="{{ url_for('user.modify_post') }}" method="post"> <form action="{{ url_for('user.modify_post') }}" method="post">
{{ post.editform.csrf_token }} {{ post.editform.csrf_token }}
{{ post.editform.post_id() }} {{ post.editform.post_id() }}
<tr>
<td>{{ post.id }}</td> <td>{{ post.id }}</td>
<td><pre style="margin: 0;">{{ post.md5[:7] }}</pre></td> <td><pre style="margin: 0;">{{ post.md5[:7] }}</pre></td>
<td> <td>{{ management_gen_line(post.rating.name.capitalize(), post.editform.rating) }}</td>
<span class="show">{{ post.rating.name.capitalize() }}</span> <td>{{ management_gen_line(post.status.name.capitalize(), post.editform.status) }}</td>
<span class="edit">{{ post.editform.rating() }}{{ errors(post.editform.rating) }}</span> <td>{{ management_gen_line(post.source, post.editform.source) }}</td>
</td>
<td>
<span class="show">{{ post.status.name.capitalize() }}</span>
<span class="edit">{{ post.editform.status() }}{{ errors(post.editform.status) }}</span>
</td>
<td>
<span class="show">{{ post.source }}</span>
<span class="edit">{{ post.editform.source() }}{{ errors(post.editform.source) }}</span>
</td>
<td>{{ post.origin_filename }}</td> <td>{{ post.origin_filename }}</td>
<td> <td>
<label class="show to-edit"><span class="fa fa-edit"></span></label> <label class="show to-edit"><span class="fa fa-edit"></span></label>
@ -43,8 +34,8 @@
<label class="edit"><span class="fa fa-check"></span>{{ post.editform.edit() }}</label> <label class="edit"><span class="fa fa-check"></span>{{ post.editform.edit() }}</label>
<label><span class="fa fa-trash-o"></span>{{ post.editform.delete() }}</label> <label><span class="fa fa-trash-o"></span>{{ post.editform.delete() }}</label>
</td> </td>
</form>
</tr> </tr>
</form>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>

@ -1,7 +1,7 @@
{% extends 'layout/settings.html' %} {% extends 'layout/settings.html' %}
{% from "_formhelpers.html" import errors %} {% from "_formhelpers.html" import errors %}
{% block setting_content %} {% block main_content %}
<section class="manage_profile"> <section class="manage_profile">
<form action="" method="post"> <form action="" method="post">
<h3>Change password</h3> <h3>Change password</h3>

@ -1,12 +1,13 @@
{% extends 'layout/settings.html' %} {% extends 'layout/settings.html' %}
{% from '_includes.html' import render_pagination with context %} {% from '_includes.html' import render_pagination with context %}
{% from "_formhelpers.html" import errors %} {% from "_formhelpers.html" import management_gen_line, errors %}
{% block setting_content %} {% block main_content %}
<section class="management_table manage_users"> <section class="management_table manage_users">
<table> <table>
<thead> <thead>
<tr> <tr>
<th>ID</th>
<th>Username</th> <th>Username</th>
<th>User status</th> <th>User status</th>
<th>Perm level</th> <th>Perm level</th>
@ -16,22 +17,14 @@
</thead> </thead>
<tbody> <tbody>
{% for user in users %} {% for user in users %}
<tr>
<form action="{{ url_for('user.modify_user') }}" method="post"> <form action="{{ url_for('user.modify_user') }}" method="post">
{{ user.editform.csrf_token }} {{ user.editform.csrf_token }}
{{ user.editform.user_id() }} {{ user.editform.user_id() }}
<td> <tr>
<span class="show">{{ user.username }}</span> <td>{{ user.id }}</td>
<span class="edit">{{ user.editform.username() }}{{ errors(user.editform.username) }}</span> <td>{{ management_gen_line(user.username, user.editform.username) }}</td>
</td> <td>{{ management_gen_line(user.user_status.name.capitalize(), user.editform.user_status) }}</td>
<td> <td>{{ management_gen_line(user.op_level.name.capitalize(), user.editform.op_level) }}</td>
<span class="show">{{ user.user_status.name.capitalize() }}</span>
<span class="edit">{{ user.editform.user_status() }}{{ errors(user.editform.user_status) }}</span>
</td>
<td>
<span class="show">{{ user.op_level.name.capitalize() }}</span>
<span class="edit">{{ user.editform.op_level() }}{{ errors(user.editform.user_status) }}</span>
</td>
<td>{{ user.last_login.strftime('%I:%M %p %d %b, %Y') }}</td> <td>{{ user.last_login.strftime('%I:%M %p %d %b, %Y') }}</td>
<td> <td>
<label class="show to-edit"><span class="fa fa-edit"></span></label> <label class="show to-edit"><span class="fa fa-edit"></span></label>
@ -39,8 +32,8 @@
<label class="edit"><span class="fa fa-check"></span>{{ user.editform.edit() }}</label> <label class="edit"><span class="fa fa-check"></span>{{ user.editform.edit() }}</label>
<label><span class="fa fa-trash-o"></span>{{ user.editform.delete() }}</label> <label><span class="fa fa-trash-o"></span>{{ user.editform.delete() }}</label>
</td> </td>
</form>
</tr> </tr>
</form>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>

@ -1,11 +1,7 @@
{% extends 'layout/base.html' %} {% extends 'layout/base_sidebar_tags.html' %}
{% from '_includes.html' import render_tags, render_pagination with context %} {% from '_includes.html' import render_pagination with context %}
{% block content %} {% block main_content %}
<div class="important_subwrap">
<section class="side_panel">
{{ render_tags() }}
</section>
<section class="post_list"> <section class="post_list">
<div class="posts"> <div class="posts">
{% for post in posts %} {% for post in posts %}
@ -29,5 +25,4 @@
</div> </div>
{{ render_pagination('post.posts') }} {{ render_pagination('post.posts') }}
</section> </section>
</div> {% endblock %}
{% endblock content %}

@ -1,42 +1,50 @@
{% extends 'layout/base.html' %} {% extends 'layout/base_sidebar_tags.html' %}
{% from '_includes.html' import render_tags, render_comments, render_post_edit with context %} {% from '_includes.html' import render_comments, render_post_edit with context %}
{% from "_formhelpers.html" import errors %} {% from "_formhelpers.html" import errors %}
{% block content %} {% block sidebar %}
<div class="important_subwrap">
<section class="side_panel">
<article class="post_desc"> <article class="post_desc">
<!-- <h4>Description</h4> --> <!-- <h4>Description</h4> -->
<!-- <img src="/static/profile.jpg" alt=""> --> <!-- <img src="/static/profile.jpg" alt=""> -->
<div class="id">Id: {{ post.id }}</div> <div class="id">Id: {{ post.id }}</div>
<div class="author">Author: {{ post.author.username or "Deleted Account" }}</div> <div class="author">Author: {{ post.author.username or "Deleted Account" }}</div>
{% if post.is_approved %} {% if post.is_approved %}
<div class="approver">Approved by: {{ post.approver.username }}</div> <div class="approver">Approved by: {{ post.approver.username }}</div>
{% endif %} {% endif %}
{% if not post.is_approved %} {% if not post.is_approved %}
<div class="status">Status: {{ post.status.name.capitalize() }}</div> <div class="status">Status: {{ post.status.name.capitalize() }}</div>
{% endif %} {% endif %}
<div class="time">Posted: {{ post.natural_created() }}</div> <div class="time">Posted: {{ post.natural_created() }}</div>
<div class="source">Source: <a href="{{ post.source }}">{{ post.source }}</a></div> <div class="source">Source: <a href="{{ post.source }}">{{ post.source }}</a></div>
<div class="size">File size: {{ post.filesize_human }}</div> <div class="size">File size: {{ post.filesize_human }}</div>
<div class="resolution">Image res: {{ post.image_resolution }}</div> <div class="resolution">Image res: {{ post.image_resolution }}</div>
<div class="jpeg"><a href="{{ post.url(path=post.image_url, endpoint='jpeg') }}">Enlarge image</a></div> <div class="jpeg"><a href="{{ post.url(path=post.image_url, endpoint='jpeg') }}">Enlarge image</a></div>
{% if post.filetype.name == 'png' %} {% if post.filetype.name == 'png' %}
<div class="png"><a href="{{ post.url(path=post.image_url) }}">Original PNG file</a></div> <div class="png"><a href="{{ post.url(path=post.image_url) }}">Original PNG file</a></div>
{% endif %} {% endif %}
</article> </article>
{{ render_tags() }}
{{ super() }}
{% if post.can_edit %} {% if post.can_edit %}
{{ render_post_edit() }} {{ render_post_edit() }}
{% endif %} {% endif %}
</section> {% endblock %}
{% block main_content %}
<section class="post_single"> <section class="post_single">
<div class="image"> <div class="image">
<img src="{{ post.url(path=post.image_url, endpoint='jpeg') }}" alt=""> <img src="{{ post.url(path=post.image_url, endpoint='jpeg') }}" alt="">
</div> </div>
</section> </section>
</div> {% endblock %}
{% block content %}
{{ super() }}
<section class="comments"> <section class="comments">
<h3>Comments</h3> <h3>Comments</h3>
{{ render_comments() }} {{ render_comments() }}
@ -58,4 +66,4 @@
<h4>To comment, please log in.</h3> <h4>To comment, please log in.</h3>
{% endif %} {% endif %}
</section> </section>
{% endblock content %} {% endblock %}
Loading…
Cancel
Save