-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
415 additions
and
494 deletions.
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
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
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
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
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
24 changes: 13 additions & 11 deletions
24
froide_campaign/templates/admin/froide_campaign/informationobject/change_list.html
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
{% extends "admin/change_list.html" %} | ||
{% load i18n %} | ||
|
||
{% block content %} | ||
{{ block.super }} | ||
<div> | ||
<form method="post" action="{% url 'admin:froide_campaign-admin_upload' %}" enctype="multipart/form-data">{% csrf_token %} | ||
<p> | ||
<input type="file" name="file"/> | ||
<input type="submit" value="{% trans "Upload information objects as CSV" %}"/> | ||
</p> | ||
</form> | ||
</div> | ||
{% endblock %} | ||
{{ block.super }} | ||
<div> | ||
<form method="post" | ||
action="{% url 'admin:froide_campaign-admin_upload' %}" | ||
enctype="multipart/form-data"> | ||
{% csrf_token %} | ||
<p> | ||
<input type="file" name="file" /> | ||
<input type="submit" value="{% trans "Upload information objects as CSV" %}" /> | ||
</p> | ||
</form> | ||
</div> | ||
{% endblock content %} |
94 changes: 40 additions & 54 deletions
94
froide_campaign/templates/froide_campaign/_info_object.html
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 |
---|---|---|
@@ -1,58 +1,44 @@ | ||
{% load i18n %} | ||
|
||
{% load follow_tags %} | ||
|
||
<tr> | ||
<td> | ||
{% block action_column %} | ||
{% if object.foirequest %} | ||
<a href="{{ object.foirequest.get_absolute_url }}"> | ||
{{ object.foirequest.readable_status }} | ||
{% if object.campaign.category %} | ||
– {{ object.campaign.category }} | ||
{% endif %} | ||
</a> | ||
{% elif object.resolved %} | ||
{% trans "Information already public" %} | ||
{% elif object.campaign.paused %} | ||
<span class="btn btn-default" disabled="disabled"> | ||
{% trans "Campaign currently suspended" %} | ||
</span> | ||
{% else %} | ||
<a class="btn btn-primary" href="{{ object.make_request_url }}&redirect={{ campaign_url|urlencode }}{{ "?"|urlencode }}{{ getvars_complete|urlencode }}"> | ||
{% if object.campaign.category %} | ||
{% blocktrans with name=object.campaign.category %}Request {{ name }}{% endblocktrans %} | ||
{% else %} | ||
{% trans "Make request" %} | ||
{% endif %} | ||
</a> | ||
{% endif %} | ||
|
||
{% if object.foirequest and request.user.is_authenticated and request.user != object.foirequest.user %} | ||
{% follow_form "request" object.foirequest follow_only=True verbose=False %} | ||
{% endif %} | ||
{% endblock %} | ||
</td> | ||
<td> | ||
{% block description_column %} | ||
{% if object.foirequest %} | ||
{{ object.get_description }} | ||
{% elif object.resolved %} | ||
{% if object.resolution_link %} | ||
<a href="{{ object.resolution_link }}"> | ||
{% endif %} | ||
|
||
{{ object.get_description }} | ||
|
||
{% if object.resolution_link %} | ||
</a> | ||
{% endif %} | ||
{% if object.resolution_text %} | ||
<p>{{ object.resolution_text }}</p> | ||
{% endif %} | ||
{% else %} | ||
{{ object.get_description }} | ||
{% endif %} | ||
{% endblock %} | ||
</td> | ||
<td> | ||
{% block action_column %} | ||
{% if object.foirequest %} | ||
<a href="{{ object.foirequest.get_absolute_url }}"> | ||
{{ object.foirequest.readable_status }} | ||
{% if object.campaign.category %}– {{ object.campaign.category }}{% endif %} | ||
</a> | ||
{% elif object.resolved %} | ||
{% trans "Information already public" %} | ||
{% elif object.campaign.paused %} | ||
<span class="btn btn-default" disabled="disabled">{% trans "Campaign currently suspended" %}</span> | ||
{% else %} | ||
<a class="btn btn-primary" | ||
href="{{ object.make_request_url }}&redirect={{ campaign_url|urlencode }}{{ "?"|urlencode }}{{ getvars_complete|urlencode }}"> | ||
{% if object.campaign.category %} | ||
{% blocktrans with name=object.campaign.category %}Request {{ name }}{% endblocktrans %} | ||
{% else %} | ||
{% trans "Make request" %} | ||
{% endif %} | ||
</a> | ||
{% endif %} | ||
{% if object.foirequest and request.user.is_authenticated and request.user != object.foirequest.user %} | ||
{% follow_form "request" object.foirequest follow_only=True verbose=False %} | ||
{% endif %} | ||
{% endblock action_column %} | ||
</td> | ||
<td> | ||
{% block description_column %} | ||
{% if object.foirequest %} | ||
{{ object.get_description }} | ||
{% elif object.resolved %} | ||
{% if object.resolution_link %}<a href="{{ object.resolution_link }}">{% endif %} | ||
{{ object.get_description }} | ||
{% if object.resolution_link %}</a>{% endif %} | ||
{% if object.resolution_text %}<p>{{ object.resolution_text }}</p>{% endif %} | ||
{% else %} | ||
{{ object.get_description }} | ||
{% endif %} | ||
{% endblock description_column %} | ||
</td> | ||
</tr> |
29 changes: 10 additions & 19 deletions
29
froide_campaign/templates/froide_campaign/_info_object_no_foi.html
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 |
---|---|---|
@@ -1,22 +1,13 @@ | ||
{% load i18n %} | ||
|
||
<tr> | ||
<td> | ||
<a class="btn btn-primary" href="{{ object.get_search_url }}"> | ||
{% trans "Search online" %} | ||
</a> | ||
</td> | ||
<td> | ||
{% if object.foirequest %} | ||
<a href="{{ object.foirequest.get_absolute_url }}"> | ||
{% endif %} | ||
{{ object.get_description }} | ||
{% if object.foirequest %} | ||
</a> | ||
{% endif %} | ||
<br/> | ||
{% if object.foirequest %} | ||
{{ object.foirequest.readable_status }} | ||
{% endif %} | ||
</td> | ||
<td> | ||
<a class="btn btn-primary" href="{{ object.get_search_url }}">{% trans "Search online" %}</a> | ||
</td> | ||
<td> | ||
{% if object.foirequest %}<a href="{{ object.foirequest.get_absolute_url }}">{% endif %} | ||
{{ object.get_description }} | ||
{% if object.foirequest %}</a>{% endif %} | ||
<br /> | ||
{% if object.foirequest %}{{ object.foirequest.readable_status }}{% endif %} | ||
</td> | ||
</tr> |
43 changes: 21 additions & 22 deletions
43
froide_campaign/templates/froide_campaign/_questionaire.html
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 |
---|---|---|
@@ -1,31 +1,30 @@ | ||
{% load i18n %} | ||
|
||
{% load markup %} | ||
{% load form_helper %} | ||
|
||
{% if questionaire and iobj and foirequest %} | ||
<form method="post" action="{% url 'campaign-add_campaign_report' questionaire_id=questionaire.id iobj_id=iobj.id foirequest_id=foirequest.id %}"> | ||
{% csrf_token %} | ||
<h3>{{ questionaire.title }}</h3> | ||
<div>{{ questionaire.description|markdown }}</div> | ||
{% if report_count %} | ||
<p> | ||
{% blocktranslate count report_count=report_count %} | ||
<form method="post" | ||
action="{% url 'campaign-add_campaign_report' questionaire_id=questionaire.id iobj_id=iobj.id foirequest_id=foirequest.id %}"> | ||
{% csrf_token %} | ||
<h3>{{ questionaire.title }}</h3> | ||
<div>{{ questionaire.description|markdown }}</div> | ||
{% if report_count %} | ||
<p> | ||
{% blocktranslate count report_count=report_count %} | ||
You already made a submission. | ||
{% plural %} | ||
You already made {{ report_count }} submissions. | ||
{% endblocktranslate %} | ||
</p> | ||
{% endif %} | ||
{% render_form form %} | ||
<p class="text-end"> | ||
<button class="btn btn-primary" type="submit"> | ||
{% if questionaire.multiple_reports %} | ||
{% translate "Add entry" %} | ||
{% else %} | ||
{% translate "Save" %} | ||
</p> | ||
{% endif %} | ||
</button> | ||
</p> | ||
</form> | ||
{% endif %} | ||
{% render_form form %} | ||
<p class="text-end"> | ||
<button class="btn btn-primary" type="submit"> | ||
{% if questionaire.multiple_reports %} | ||
{% translate "Add entry" %} | ||
{% else %} | ||
{% translate "Save" %} | ||
{% endif %} | ||
</button> | ||
</p> | ||
</form> | ||
{% endif %} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block app_body %} | ||
{% block main %}{% endblock %} | ||
{% endblock %} | ||
{% block main %} | ||
{% endblock main %} | ||
{% endblock app_body %} |
Oops, something went wrong.