diff options
Diffstat (limited to 'python/fatcat_web')
| -rw-r--r-- | python/fatcat_web/routes.py | 9 | ||||
| -rw-r--r-- | python/fatcat_web/templates/base.html | 4 | ||||
| -rw-r--r-- | python/fatcat_web/templates/changelog.html | 2 | ||||
| -rw-r--r-- | python/fatcat_web/templates/editgroup_reviewable.html | 23 | ||||
| -rw-r--r-- | python/fatcat_web/templates/editor_editgroups.html | 22 | ||||
| -rw-r--r-- | python/fatcat_web/templates/editor_view.html | 2 | 
6 files changed, 50 insertions, 12 deletions
| diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 57b5d5af..7a148e94 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -416,6 +416,15 @@ def changelog_entry_view(index):          abort(ae.status)      return render_template('changelog_view.html', entry=entry, editgroup=entry.editgroup) +@app.route('/reviewable', methods=['GET']) +def reviewable_view(): +    try: +        #limit = int(request.args.get('limit', 10)) +        entries = api.get_editgroups_reviewable() +    except ApiException as ae: +        abort(ae.status) +    return render_template('editgroup_reviewable.html', entries=entries) +  ### Search ##################################################################  @app.route('/release/search', methods=['GET', 'POST']) diff --git a/python/fatcat_web/templates/base.html b/python/fatcat_web/templates/base.html index fcd7ccdf..37641c90 100644 --- a/python/fatcat_web/templates/base.html +++ b/python/fatcat_web/templates/base.html @@ -59,8 +59,8 @@        <div class="ui simple dropdown item">        {{ current_user.username }} <i class="dropdown icon"></i>          <div class="menu"> -          <a class="item" href="#"><i class="edit icon"></i>Edits in Progress</a> -          <a class="item" href="/editor/{{ current_user.editor_id }}/changelog"><i class="history icon"></i>History</a> +          {# <a class="item" href="#"><i class="edit icon"></i>Edits in Progress</a> #} +          <a class="item" href="/editor/{{ current_user.editor_id }}/editgroups"><i class="history icon"></i>Edit History</a>            <div class="divider"></div>            <a class="item" href="/auth/account"><i class="user icon"></i>Account</a>            <a class="item" href="/auth/logout"><i class="sign out icon"></i>Logout</a> diff --git a/python/fatcat_web/templates/changelog.html b/python/fatcat_web/templates/changelog.html index f33fe7c8..df51e7db 100644 --- a/python/fatcat_web/templates/changelog.html +++ b/python/fatcat_web/templates/changelog.html @@ -4,7 +4,7 @@  <h1 class="ui header">Recent Changes  <div class="sub header"><code>changelog</code></div></h1> -Limited to the most recent ~50 entries. +Limited to the most recent entries.  <table class="ui table">    <thead><tr><th>Changelog<br>Index diff --git a/python/fatcat_web/templates/editgroup_reviewable.html b/python/fatcat_web/templates/editgroup_reviewable.html new file mode 100644 index 00000000..f3d75353 --- /dev/null +++ b/python/fatcat_web/templates/editgroup_reviewable.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% block body %} + +<h1 class="ui header">Reviewable Editgroups +</h1> + +Limited to the most recent entries. + +<table class="ui table"> +  <thead><tr><th>Submitted (UTC) +             <th>Editgroup +             <th>Editor +             <th>Description +  <tbody> +  {% for editgroup in entries %} +  <tr><td>{{ editgroup.submitted }} +      <td><a href="/editgroup/{{ editgroup.editgroup_id }}">{{ editgroup.editgroup_id }}</a> +      <td><a href="/editor/{{ editgroup.editor_id }}">{{ editgroup.editor_id }}</a> +      <td>{% if editgroup.description != None %}{{ editgroup.description }}{% endif %} +  {% endfor %} +</table> + +{% endblock %} diff --git a/python/fatcat_web/templates/editor_editgroups.html b/python/fatcat_web/templates/editor_editgroups.html index cb9b2f56..7643981f 100644 --- a/python/fatcat_web/templates/editor_editgroups.html +++ b/python/fatcat_web/templates/editor_editgroups.html @@ -1,25 +1,31 @@  {% extends "base.html" %}  {% block body %} -<h1 class="ui header">Editor Changelog: {{ editor.username }} +<h1 class="ui header">Edit History  <div class="sub header"> -  <a href="/editor/{{editor.editor_id}}"> -    <code>editor {{ editor.editor_id }}</code> +    <code>editor +      <a href="/editor/{{editor.editor_id}}">{{ editor.username }}</a> +    </code>    </a>  </div>  </h1> -<p>Changes accepted (aka, merged editgroups):  <table class="ui table"> -  <thead><tr><th>Created (UTC) +  <thead><tr>{# <th>Created (UTC) #} +             <th>Status               <th>Editgroup -             <th>Editor               <th>Description    <tbody>    {% for editgroup in editgroups %} -  <tr><td>{{ editgroup.created }} +  <tr>{# <td>{{ editgroup.created }} #} +      <td>{% if editgroup.changelog_index %} +            Merged<br>(<a href="/changelog/{{ editgroup.changelog_index }}">#{{ editgroup.changelog_index }}</a>) +          {% elif editgroup.submitted %} +            Submitted<br>({{ editgroup.submitted }}) +          {% else %} +            Work in Progress +          {% endif %}        <td><code><a href="/editgroup/{{ editgroup.editgroup_id }}">{{ editgroup.editgroup_id }}</a></code> -      <td><code><a href="/editor/{{ editgroup.editor_id }}">{{ editgroup.editor_id }}</a></code>        <td>{% if editgroup.description != None %}{{ editgroup.description }}{% endif %}    {% endfor %}  </table> diff --git a/python/fatcat_web/templates/editor_view.html b/python/fatcat_web/templates/editor_view.html index eef4f040..4d94ceaf 100644 --- a/python/fatcat_web/templates/editor_view.html +++ b/python/fatcat_web/templates/editor_view.html @@ -7,6 +7,6 @@  </div>  </h1> -<p><b><a href="/editor/{{ editor.editor_id }}/changelog">View editor's changelog</a></b> +<p><b><a href="/editor/{{ editor.editor_id }}/editgroups">View editor's editgroups</a></b>  {% endblock %} | 
