forked from Signbank/FinSL-signbank
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding editorial queue * Removing print line * Changing page heading * Change wording
- Loading branch information
Showing
5 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from .dictionary.models import Gloss | ||
from django.shortcuts import render | ||
from django_comments import get_model as django_comments_get_model | ||
|
||
|
||
def get_queue_items(request): | ||
""" | ||
As per the first comment of N2-92, get the glosses which are assigned to you | ||
""" | ||
user = request.user | ||
glosses = Gloss.objects.filter(assigned_user=user) | ||
gloss_data = [] | ||
for gloss in glosses: | ||
comments = django_comments_get_model().objects.filter( | ||
object_pk=str(gloss.id), | ||
is_removed=False, | ||
).order_by('-submit_date')[:3] | ||
gloss_data.append({ | ||
'gloss': gloss, | ||
'comments': comments | ||
}) | ||
|
||
if 'details/' in request.path: | ||
template = 'editorial_queue/queue_gloss_details.html' | ||
else: | ||
template = 'editorial_queue/queue.html' | ||
|
||
return render(request, template, {'glosses': gloss_data}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% extends "baselayout.html" %} | ||
{% load i18n %} | ||
{% block bootstrap3_title %}{% blocktrans %}Editorial Queue{% endblocktrans %} | {% endblock %} | ||
{% block content %} | ||
{% include "editorial_queue/queue_gloss_details.html" %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% load i18n %} | ||
<div class="latest_comments"> | ||
<h2><a href="{% url 'queue' %}">{% blocktrans %}Editorial Queue{% endblocktrans %}</a></h2> | ||
{% for gloss in glosses %} | ||
{% load tagging_tags %} | ||
{% tags_for_object gloss.gloss as tag_list %} | ||
<article class="gloss"> | ||
<header> | ||
<h4 class="gloss-header"><a href="{{gloss.gloss.get_absolute_url}}"><strong>{{gloss.gloss.idgloss}}</strong> | ||
<span class="glyphicon glyphicon-time" aria-hidden="true"></span> <em>{{gloss.gloss.updated_at}}</em> - | ||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{gloss.gloss.assigned_user}}</a> | ||
{% if tag_list %} | ||
{% for tag in tag_list %} | ||
<div class="comment-tags" style="display:inline;"> | ||
<span class="label label-info" style="font-size:60%;">{{tag}}</span> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
</h4> | ||
</header> | ||
{% if gloss.comments %} | ||
<div class="panel panel-default"> | ||
{% for comment in gloss.comments %} | ||
<div class="panel-body"> | ||
<p><b>{{comment.comment}}</b> <em>{{ comment.submit_date }}</em>, <em>{{ comment.user }}</em></p> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
</article> | ||
{% endfor %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters