mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-30 04:42:19 -05:00
enable showing or not for epub/mobi/pdf export buttons
This commit is contained in:
parent
1256e4c645
commit
5ea5310ab4
@ -52,6 +52,12 @@
|
||||
@define ('FLATTRABLE', '1');
|
||||
@define ('FLATTRED', '2');
|
||||
@define ('CARROT', FALSE);
|
||||
|
||||
// ebook
|
||||
@define ('EPUB', TRUE);
|
||||
@define ('MOBI', FALSE);
|
||||
@define ('PDF', FALSE);
|
||||
|
||||
// display or not print link in article view
|
||||
@define ('SHOW_PRINTLINK', '1');
|
||||
// display or not percent of read in article view. Affects only default theme.
|
||||
|
@ -61,17 +61,17 @@
|
||||
{% if searchterm is defined %}<a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">{% trans "Tag these results as" %} {{ searchterm }}</a>{% endif %}<br />
|
||||
|
||||
{% if tag %}
|
||||
<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>
|
||||
<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>
|
||||
<a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>
|
||||
{% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>{% endif %}
|
||||
{% elseif searchterm is defined %}
|
||||
<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>
|
||||
<a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>
|
||||
<a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>
|
||||
{% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>{% endif %}
|
||||
{% else %}
|
||||
<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>
|
||||
<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>
|
||||
<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>
|
||||
{% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -19,9 +19,9 @@
|
||||
{% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numFlattrs }})</a></li>{% endif %}{% endif %}
|
||||
{% if constant('CARROT') == 1 %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="{% trans "carrot" %}"><span>Carrot</span></a></li>{% endif %}
|
||||
{% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool icon icon-print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %}
|
||||
<li><a href="./?epub&method=id&value={{ entry.id|e }}" title="Generate ePub file">EPUB</a></li>
|
||||
<li><a href="./?mobi&method=id&value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>
|
||||
<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>
|
||||
{% if constant('EPUB') == 1 %}<li><a href="./?epub&method=id&value={{ entry.id|e }}" title="Generate ePub file">EPUB</a></li>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<li><a href="./?mobi&method=id&value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}
|
||||
<li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -61,17 +61,17 @@
|
||||
{% if searchterm is defined %}<a title="{% trans "Tag these results as" %} {{ searchterm }}" href="./?action=add_tag&search={{ searchterm }}">{% trans "Tag these results as" %} {{ searchterm }}</a>{% endif %}<br />
|
||||
|
||||
{% if tag %}
|
||||
<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>
|
||||
<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>
|
||||
<a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>
|
||||
{% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this tag in an epub file" %}" href="./?epub&method=tag&value={{ tag.value }}">{% trans "Download as ePub3" %}</a>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this tag in a mobi file" %}" href="./?mobi&method=tag&value={{ tag.value }}">{% trans "Download as Mobi" %}</a>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this tag in a pdf file" %}" href="./?pdf&method=tag&value={{ tag.value }}">{% trans "Download as PDF" %}</a>{% endif %}
|
||||
{% elseif searchterm is defined %}
|
||||
<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>
|
||||
<a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>
|
||||
<a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>
|
||||
{% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this search in an epub" %}" href="./?epub&method=search&value={{ searchterm }}">{% trans "Download as ePub3" %}</a>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this search in a mobi file" %}" href="./?mobi&method=search&value={{ searchterm }}">{% trans "Download as Mobi" %}</a>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this search in a pdf file" %}" href="./?pdf&method=search&value={{ searchterm }}">{% trans "Download as PDF" %}</a>{% endif %}
|
||||
{% else %}
|
||||
<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>
|
||||
<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>
|
||||
<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>
|
||||
{% if constant('EPUB') == 1 %}<a title="{% trans "Download the articles from this category in an epub" %}" href="./?epub&method=category&value={{ view }}">{% trans "Download as ePub3" %}</a>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<a title="{% trans "Download the articles from this category in a mobi file" %}" href="./?mobi&method=category&value={{ view }}">{% trans "Download as Mobi" %}</a>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<a title="{% trans "Download the articles from this category in a pdf file" %}" href="./?pdf&method=category&value={{ view }}">{% trans "Download as PDF" %}</a>{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
@ -18,7 +18,9 @@
|
||||
{% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span>{{ flattr.numFlattrs }}</a></li>{% endif %}{% endif %}
|
||||
{% if constant('CARROT') == 1 %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon" target="_blank" title="{% trans "carrot" %}"><span>{% trans "carrot" %}</span></a></li>{% endif %}
|
||||
{% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %}
|
||||
<li><a href="./?epub&method=id&value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li>
|
||||
{% if constant('EPUB') == 1 %}<li><a href="./?epub&method=id&value={{ entry.id|e }}" title="Generate ePub file">EPUB</a></li>{% endif %}
|
||||
{% if constant('MOBI') == 1 %}<li><a href="./?mobi&method=id&value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
|
||||
{% if constant('PDF') == 1 %}<li><a href="./?pdf&method=id&value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}
|
||||
<li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
|
||||
{% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user