1
1
Fork 0

ÚKLID TIME

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

@ -7,3 +7,8 @@
</ul>
{% endif %}
{% 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 %}
{% block content %}
<div class="important_subwrap">
<section class="side_panel">
{% block sidebar %}
{{ render_sidenav({"speedtest": ("Speedtest", "http://speedtest.cesnet.cz")}) }}
</section>
{% block setting_content %}{% endblock %}
</div>
{% endblock content %}
{% endblock %}

@ -1,8 +1,8 @@
{% extends 'layout/settings.html' %}
{% 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">
<table>
<thead>
@ -18,24 +18,15 @@
</thead>
<tbody>
{% for post in posts %}
<tr>
<form action="{{ url_for('user.modify_post') }}" method="post">
{{ post.editform.csrf_token }}
{{ post.editform.post_id() }}
<tr>
<td>{{ post.id }}</td>
<td><pre style="margin: 0;">{{ post.md5[:7] }}</pre></td>
<td>
<span class="show">{{ post.rating.name.capitalize() }}</span>
<span class="edit">{{ post.editform.rating() }}{{ errors(post.editform.rating) }}</span>
</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>{{ management_gen_line(post.rating.name.capitalize(), post.editform.rating) }}</td>
<td>{{ management_gen_line(post.status.name.capitalize(), post.editform.status) }}</td>
<td>{{ management_gen_line(post.source, post.editform.source) }}</td>
<td>{{ post.origin_filename }}</td>
<td>
<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><span class="fa fa-trash-o"></span>{{ post.editform.delete() }}</label>
</td>
</form>
</tr>
</form>
{% endfor %}
</tbody>
</table>

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

@ -1,12 +1,13 @@
{% extends 'layout/settings.html' %}
{% 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">
<table>
<thead>
<tr>
<th>ID</th>
<th>Username</th>
<th>User status</th>
<th>Perm level</th>
@ -16,22 +17,14 @@
</thead>
<tbody>
{% for user in users %}
<tr>
<form action="{{ url_for('user.modify_user') }}" method="post">
{{ user.editform.csrf_token }}
{{ user.editform.user_id() }}
<td>
<span class="show">{{ user.username }}</span>
<span class="edit">{{ user.editform.username() }}{{ errors(user.editform.username) }}</span>
</td>
<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>
<tr>
<td>{{ user.id }}</td>
<td>{{ management_gen_line(user.username, user.editform.username) }}</td>
<td>{{ management_gen_line(user.user_status.name.capitalize(), user.editform.user_status) }}</td>
<td>{{ management_gen_line(user.op_level.name.capitalize(), user.editform.op_level) }}</td>
<td>{{ user.last_login.strftime('%I:%M %p %d %b, %Y') }}</td>
<td>
<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><span class="fa fa-trash-o"></span>{{ user.editform.delete() }}</label>
</td>
</form>
</tr>
</form>
{% endfor %}
</tbody>
</table>

@ -1,12 +1,8 @@
{% extends 'layout/base.html' %}
{% from '_includes.html' import render_tags, render_pagination with context %}
{% extends 'layout/base_sidebar_tags.html' %}
{% from '_includes.html' import render_pagination with context %}
{% block content %}
<div class="important_subwrap">
<section class="side_panel">
{{ render_tags() }}
</section>
<section class="post_list">
{% block main_content %}
<section class="post_list">
<div class="posts">
{% for post in posts %}
<figure style="{{ post.flex }}">
@ -28,6 +24,5 @@
</figure> -->
</div>
{{ render_pagination('post.posts') }}
</section>
</div>
{% endblock content %}
</section>
{% endblock %}

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