]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
merge
authorThomas Citharel <tcit@tcit.fr>
Sun, 1 Feb 2015 11:05:10 +0000 (12:05 +0100)
committerThomas Citharel <tcit@tcit.fr>
Sun, 1 Feb 2015 11:05:10 +0000 (12:05 +0100)
inc/poche/Poche.class.php
inc/poche/config.inc.default.php
themes/baggy/view.twig
themes/default/css/style-default.css
themes/default/img/default/reload.png [new file with mode: 0644]
themes/default/view.twig

index 5b8e235f11fd5b9d679ded9486d65154c0f3b5bc..fb74ab9a0aaa23ec1e0ba0eb7b89e4de8cda384a 100755 (executable)
@@ -337,6 +337,16 @@ class Poche
                 $this->messages->add('s', _('The tag has been successfully deleted'));
                 Tools::redirect();
                 break;
+
+            case 'reload_article' :
+                Tools::logm('reload article');
+                $id = $_GET['id'];
+                $entry = $this->store->retrieveOneById($id, $this->user->getId());
+                Tools::logm('reload url ' . $entry['url']);
+                $url = new Url(base64_encode($entry['url']));
+                $this->action('add', $url);
+                break;
+                
             /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */
             case 'random':
                 $count = $this->store->getEntriesByViewCount($view, $this->user->getId());
index a159e713c700deb013e21a3507d1c258d2635755..aaaf12a664e00eb8914bd56d95e7a01eaef79321 100755 (executable)
@@ -62,6 +62,7 @@
 @define ('SHOW_PRINTLINK', '1');
 // display or not percent of read in article view. Affects only default theme.
 @define ('SHOW_READPERCENT', '1');
+@define ('RELOAD_ARTICLE', TRUE);
 @define ('ABS_PATH', 'assets/');
 
 @define ('DEFAULT_THEME', 'baggy');
index 1afd9df6a46d53894efb9343d66099df0ae3e410..0a8380ded10977a843b994ad0b735c8a638b0c28 100755 (executable)
@@ -19,6 +19,7 @@
                 {% 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 %}
+                {% if constant('RELOAD_ARTICLE') == 1 %}<li><a class="tool reload icon icon-reload" href="./?action=reload_article&amp;id={{ entry.id|e }}" title="{% trans "Reload article" %}"><span>{% trans "Reload article" %}</span></a></li>{% endif %}
                 {% if constant('EPUB') == 1 %}<li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate ePub file">EPUB</a></li>{% endif %}
                 {% if constant('MOBI') == 1 %}<li><a href="./?mobi&amp;method=id&amp;value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
                 {% if constant('PDF') == 1 %}<li><a href="./?pdf&amp;method=id&amp;value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}
index 4406d48f4329e8bdcc8423abf234092e365fed0c..666c4a28c06aeeffe912f06505bf27d6a888a7c2 100755 (executable)
@@ -67,3 +67,6 @@ a.bad-display span {
 a.print span {
                background-image: url('../img/default/print.png');
 }
+a.reload span {
+    background-image: url('../img/default/reload.png');
+}
diff --git a/themes/default/img/default/reload.png b/themes/default/img/default/reload.png
new file mode 100644 (file)
index 0000000..4c0528e
Binary files /dev/null and b/themes/default/img/default/reload.png differ
index 8f3a26c3d367597482cc3d152ae1c774daca6fb2..be8bf99e64a698938ae19f3c5bf1f8dc881a2244 100755 (executable)
@@ -18,6 +18,7 @@
                 {% 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 %}
+                {% if constant('RELOAD_ARTICLE') == 1 %}<li><a class="tool reload" href="./?action=reload_article&amp;id={{ entry.id|e }}" title="{% trans "Reload article" %}"><span>{% trans "Reload article" %}</span></a></li>{% endif %}}
                 {% if constant('EPUB') == 1 %}<li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate ePub file">EPUB</a></li>{% endif %}
                 {% if constant('MOBI') == 1 %}<li><a href="./?mobi&amp;method=id&amp;value={{ entry.id|e }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
                 {% if constant('PDF') == 1 %}<li><a href="./?pdf&amp;method=id&amp;value={{ entry.id|e }}" title="Generate PDF file">PDF</a></li>{% endif %}