]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
added reload function
authorThomas Citharel <tcit@tcit.fr>
Sat, 13 Dec 2014 21:56:30 +0000 (22:56 +0100)
committerThomas Citharel <tcit@tcit.fr>
Sat, 13 Dec 2014 21:56:30 +0000 (22:56 +0100)
inc/poche/Poche.class.php
inc/poche/config.inc.default.php
themes/baggy/css/main.css
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 27d6f4a65e1ca22079a700d8dc2cfcdde851e582..f5262a8e8fc5907734560b01b24a7d32b2e13abf 100755 (executable)
@@ -303,6 +303,15 @@ 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;
+                
             default:
                 break;
         }
@@ -812,4 +821,4 @@ class Poche
     }
 
 
-}
\ No newline at end of file
+}
index 3eaee3a3efa774509f8aa7784dbec0a02714905a..0d249c64a5b195f84ba0054fcdb49454a4f5d25a 100755 (executable)
@@ -56,6 +56,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 1df82910164098c95b5542d14c3f5e2efbf5ea79..96b681bf0285b136b5d15fd688322b5458da78ed 100755 (executable)
@@ -736,6 +736,9 @@ a.add-to-wallabag-link-after:after {
 .icon-print:before {
   content: "\e80d";
 }
+.icon-reload:before {
+/* TODO */
+}
 
 
 /* .icon-image class, for image-based icons
index 9225d11b7073279158d00210c08b453fb7d482ad..41766bf2e9114e06e9ebb3e2c141c20ebba97f25 100755 (executable)
@@ -20,6 +20,7 @@
                 {% 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&amp;method=id&amp;value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li>
+                {% 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 %}
                 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;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>
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 181e12843829f3d78178083889d63762583980db..e14a165c3f3923a2c2c53f22691fdf3bf35ed01c 100755 (executable)
@@ -19,6 +19,7 @@
                 {% 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&amp;method=id&amp;value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li>
+                {% 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 %}}
                 <li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;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>