add user posts view
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{% from 'common/macros.html' import infobox with context %}
|
||||
{% from 'common/macros.html' import subheader %}
|
||||
{%- extends 'base.html' -%}
|
||||
{%- block title -%}log in{%- endblock -%}
|
||||
@@ -7,9 +8,7 @@ Welcome back! No account yet? <a href="{{url_for('users.sign_up')}}">Sign up</a>
|
||||
{%- endset -%}
|
||||
{{ subheader('Log in', welcome)}}
|
||||
{%- if request.args.get('error') -%}
|
||||
<div class="infobox plank critical">
|
||||
{{request.args.get('error')}}
|
||||
</div>
|
||||
{{infobox(request.args.error, InfoboxKind.ERROR)}}
|
||||
{%- endif -%}
|
||||
<form class="plank primary-bg full-width" method="POST">
|
||||
<label for="username">Username</label>
|
||||
|
||||
30
app/templates/users/posts.html
Normal file
30
app/templates/users/posts.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{%- from 'common/macros.html' import full_post with context -%}
|
||||
{%- from 'common/macros.html' import subheader, pager -%}
|
||||
{%- extends 'base.html' -%}
|
||||
{%- block title -%}{{ target_user.get_readable_name() }}'s posts{%- endblock -%}
|
||||
{%- block content -%}
|
||||
{%- set td -%}
|
||||
<a href="{{url_for('users.user_page', username=target_user.username)}}">Back to profile</a>
|
||||
{%- if posts -%}
|
||||
<fieldset class="plank even no-shadow minimal thread-actions">
|
||||
<legend>Page</legend>
|
||||
{{- pager(page, page_count) -}}
|
||||
</fieldset>
|
||||
{%- endif -%}
|
||||
{%- endset -%}
|
||||
{%- call() subheader("%s's posts" % target_user.get_readable_name(), td) -%}
|
||||
{%- endcall -%}
|
||||
{%- if posts -%}
|
||||
{%- for post in posts -%}
|
||||
<div class="post plank">{{full_post(post, show_toolbar=false, show_thread=true)}}</div>
|
||||
{%- endfor -%}
|
||||
<div class="plank">
|
||||
<fieldset class="plank even no-shadow minimal thread-actions">
|
||||
<legend>Page</legend>
|
||||
{{- pager(page, page_count) -}}
|
||||
</fieldset>
|
||||
</div>
|
||||
{%- else -%}
|
||||
<div class="plank">{{target_user.get_readable_name()}} has no posts.</div>
|
||||
{%- endif -%}
|
||||
{%- endblock -%}
|
||||
@@ -1,3 +1,4 @@
|
||||
{% from 'common/macros.html' import infobox with context %}
|
||||
{% from 'common/macros.html' import subheader %}
|
||||
{%- extends 'base.html' -%}
|
||||
{%- block title -%}sign up{%- endblock -%}
|
||||
@@ -7,9 +8,7 @@ Please read the rules etc. stub
|
||||
{%- endset -%}
|
||||
{{ subheader('Sign up', welcome)}}
|
||||
{%- if request.args.get('error') -%}
|
||||
<div class="infobox plank critical">
|
||||
{{request.args.get('error')}}
|
||||
</div>
|
||||
{{infobox(request.args.error, InfoboxKind.ERROR)}}
|
||||
{%- endif -%}
|
||||
<form class="plank primary-bg full-width" method="POST">
|
||||
<label for="username">Username</label>
|
||||
|
||||
Reference in New Issue
Block a user