-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'webu/features/usable_attachments'
# Conflicts: # pybb/views.py
- Loading branch information
Showing
14 changed files
with
405 additions
and
235 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,17 +1,30 @@ | ||
{% load pybb_tags %} | ||
{% load pybb_tags static %} | ||
|
||
{% if request.user|pybb_may_attach_files %} | ||
{% load i18n %} | ||
<div class='attachments-form'> | ||
<a class='attachment-link' onclick='$("div.attachments-form table").toggle();return false;' href='#'>{% trans "Add attachments" %}</a> | ||
<div class="attachments-form"> | ||
<a class='attachment-link' style="display:none;" href='#'>{% trans "Add attachments" %}</a> | ||
{{ aformset.management_form }} | ||
<table style='display:none;'> | ||
{% for form in aformset %} | ||
<tr> | ||
<td>{{ form.id }} {{ form.file }}</td> | ||
<td>{% if form.instance.pk %}{{ form.DELETE }} {% trans "delete" %}{% endif %}</td> | ||
</tr> | ||
{% endfor %} | ||
<table class="attachment-list"> | ||
{% for form in aformset %} | ||
<tr class="attachment-item"> | ||
<td> | ||
{{ form.id }}{{ form.file }} | ||
{% if attachment_max_size %} | ||
<span title="{% trans 'If you need to upload larger files, please use an external storage website.' %}" class="help">{% blocktrans with max_size=attachment_max_size|filesizeformat%}(max size : {{ max_size }}){% endblocktrans %}</span> | ||
{% endif %} | ||
</td> | ||
<td>{% if form.instance.pk %}{{ form.DELETE }} {% trans "delete" %}{% endif %}</td> | ||
<td> | ||
<span class="attachment-ref"> | ||
<abbr title="{% trans 'Reference to your file' %}">Ref</abbr> : | ||
<span class="attachment-ref-value">[file-{{ forloop.counter }}]</span> | ||
<img style="display:none;" class="attachment-ref-insert-link" src="{% static 'pybb/img/attachment.png' %}" alt="{% trans 'link' %}" title="{% trans 'Insert a link to your file inside your post.' %}" /> | ||
<img style="display:none;" class="attachment-ref-insert-image" src="{% static 'pybb/img/image.png' %}" alt="{% trans 'image' %}" title="{% trans 'Insert your image inside your post.' %}" /> | ||
</span> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
{% endif %} | ||
{% 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
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