aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2014-12-13 22:56:30 +0100
committerThomas Citharel <tcit@tcit.fr>2014-12-13 22:56:30 +0100
commit44b95cb81deae35f58e0058910afde2f2ffb9a60 (patch)
tree521cec627e487e873742fa628655e8f787d85d1e
parent9c55ed0923273da886497cb62302a79622e34a74 (diff)
downloadwallabag-44b95cb81deae35f58e0058910afde2f2ffb9a60.tar.gz
wallabag-44b95cb81deae35f58e0058910afde2f2ffb9a60.tar.zst
wallabag-44b95cb81deae35f58e0058910afde2f2ffb9a60.zip
added reload function
-rwxr-xr-xinc/poche/Poche.class.php11
-rwxr-xr-xinc/poche/config.inc.default.php1
-rwxr-xr-xthemes/baggy/css/main.css3
-rwxr-xr-xthemes/baggy/view.twig1
-rwxr-xr-xthemes/default/css/style-default.css3
-rw-r--r--themes/default/img/default/reload.pngbin0 -> 343 bytes
-rwxr-xr-xthemes/default/view.twig1
7 files changed, 19 insertions, 1 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 27d6f4a6..f5262a8e 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -303,6 +303,15 @@ class Poche
303 $this->messages->add('s', _('The tag has been successfully deleted')); 303 $this->messages->add('s', _('The tag has been successfully deleted'));
304 Tools::redirect(); 304 Tools::redirect();
305 break; 305 break;
306 case 'reload_article' :
307 Tools::logm('reload article');
308 $id = $_GET['id'];
309 $entry = $this->store->retrieveOneById($id, $this->user->getId());
310 Tools::logm('reload url ' . $entry['url']);
311 $url = new Url(base64_encode($entry['url']));
312 $this->action('add', $url);
313 break;
314
306 default: 315 default:
307 break; 316 break;
308 } 317 }
@@ -812,4 +821,4 @@ class Poche
812 } 821 }
813 822
814 823
815} \ No newline at end of file 824}
diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php
index 3eaee3a3..0d249c64 100755
--- a/inc/poche/config.inc.default.php
+++ b/inc/poche/config.inc.default.php
@@ -56,6 +56,7 @@
56@define ('SHOW_PRINTLINK', '1'); 56@define ('SHOW_PRINTLINK', '1');
57// display or not percent of read in article view. Affects only default theme. 57// display or not percent of read in article view. Affects only default theme.
58@define ('SHOW_READPERCENT', '1'); 58@define ('SHOW_READPERCENT', '1');
59@define ('RELOAD_ARTICLE', TRUE);
59@define ('ABS_PATH', 'assets/'); 60@define ('ABS_PATH', 'assets/');
60 61
61@define ('DEFAULT_THEME', 'baggy'); 62@define ('DEFAULT_THEME', 'baggy');
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css
index 1df82910..96b681bf 100755
--- a/themes/baggy/css/main.css
+++ b/themes/baggy/css/main.css
@@ -736,6 +736,9 @@ a.add-to-wallabag-link-after:after {
736.icon-print:before { 736.icon-print:before {
737 content: "\e80d"; 737 content: "\e80d";
738} 738}
739.icon-reload:before {
740/* TODO */
741}
739 742
740 743
741/* .icon-image class, for image-based icons 744/* .icon-image class, for image-based icons
diff --git a/themes/baggy/view.twig b/themes/baggy/view.twig
index 9225d11b..41766bf2 100755
--- a/themes/baggy/view.twig
+++ b/themes/baggy/view.twig
@@ -20,6 +20,7 @@
20 {% 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 %} 20 {% 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 %}
21 {% 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 %} 21 {% 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 %}
22 <li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li> 22 <li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li>
23 {% 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 %}
23 <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> 24 <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>
24 </ul> 25 </ul>
25 </div> 26 </div>
diff --git a/themes/default/css/style-default.css b/themes/default/css/style-default.css
index 4406d48f..666c4a28 100755
--- a/themes/default/css/style-default.css
+++ b/themes/default/css/style-default.css
@@ -67,3 +67,6 @@ a.bad-display span {
67a.print span { 67a.print span {
68 background-image: url('../img/default/print.png'); 68 background-image: url('../img/default/print.png');
69} 69}
70a.reload span {
71 background-image: url('../img/default/reload.png');
72}
diff --git a/themes/default/img/default/reload.png b/themes/default/img/default/reload.png
new file mode 100644
index 00000000..4c0528e7
--- /dev/null
+++ b/themes/default/img/default/reload.png
Binary files differ
diff --git a/themes/default/view.twig b/themes/default/view.twig
index 181e1284..e14a165c 100755
--- a/themes/default/view.twig
+++ b/themes/default/view.twig
@@ -19,6 +19,7 @@
19 {% 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 %} 19 {% 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 %}
20 {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %} 20 {% if constant('SHOW_PRINTLINK') == 1 %}<li><a title="{% trans "Print" %}" class="tool print" href="javascript: window.print();"><span>{% trans "Print" %}</span></a></li>{% endif %}
21 <li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li> 21 <li><a href="./?epub&amp;method=id&amp;value={{ entry.id|e }}" title="Generate epub file">EPUB</a></li>
22 {% 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 %}}
22 <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> 23 <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>
23 {% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %} 24 {% if constant('SHOW_READPERCENT') == 1 %}<li><div id="readLeftPercent">0%</div></li>{% endif %}
24 </ul> 25 </ul>