1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00

Merge remote-tracking branch 'origin/master' into 2.1

This commit is contained in:
Jeremy Benoist 2016-08-22 23:03:16 +02:00
commit 79efca1e6f
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
45 changed files with 494 additions and 153 deletions

View file

@ -357,7 +357,7 @@ class EntryController extends Controller
}
/**
* Changes favorite status for an entry.
* Changes starred status for an entry.
*
* @param Request $request
* @param Entry $entry

View file

@ -0,0 +1,27 @@
<?php
namespace Wallabag\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class FooterController extends Controller
{
/**
* Display the footer.
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function indexAction()
{
$addonsUrl = $this->container->getParameter('addons_url');
$socialsUrl = $this->container->getParameter('socials_url');
return $this->render(
'WallabagCoreBundle::footer.html.twig',
[
'addonsUrl' => $addonsUrl,
'socialsUrl' => $socialsUrl,
]
);
}
}

View file

@ -12,9 +12,11 @@ class StaticController extends Controller
*/
public function howtoAction()
{
$addonsUrl = $this->container->getParameter('addons_url');
return $this->render(
'WallabagCoreBundle:Static:howto.html.twig',
[]
['addonsUrl' => $addonsUrl]
);
}

View file

@ -25,6 +25,7 @@ class WallabagCoreExtension extends Extension
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader->load('parameters.yml');
}
public function getAlias()

View file

@ -16,7 +16,7 @@ class StringToListTransformer implements DataTransformerInterface
private $separator;
/**
* @param string $separator The separator used in the list.
* @param string $separator The separator used in the list
*/
public function __construct($separator = ',')
{

View file

@ -21,7 +21,9 @@ class ConfigType extends AbstractType
{
$this->themes = array_combine(
$themes,
array_map(function ($s) { return ucwords(strtolower(str_replace('-', ' ', $s))); }, $themes)
array_map(function ($s) {
return ucwords(strtolower(str_replace('-', ' ', $s)));
}, $themes)
);
$this->languages = $languages;

View file

@ -25,7 +25,7 @@ class RuleBasedTagger
/**
* Add tags from rules defined by the user.
*
* @param Entry $entry Entry to tag.
* @param Entry $entry Entry to tag
*/
public function tag(Entry $entry)
{
@ -49,7 +49,7 @@ class RuleBasedTagger
*
* @param User $user
*
* @return array<Entry> A list of modified entries.
* @return array<Entry> A list of modified entries
*/
public function tagAllForUser(User $user)
{
@ -75,7 +75,7 @@ class RuleBasedTagger
/**
* Fetch a tag.
*
* @param string $label The tag's label.
* @param string $label The tag's label
*
* @return Tag
*/

View file

@ -0,0 +1,12 @@
parameters:
addons_url:
firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/
chrome: https://chrome.google.com/webstore/detail/wallabagit/peehlcgckcnclnjlndmoddifcicdnabm
f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche
google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche
ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8
windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646
socials_url:
twitter: https://twitter.com/wallabagapp
google_plus: https://plus.google.com/+WallabagOrg/posts
facebook: https://facebook.com/Wallabag

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'estimeret læsetid: %readingTime% min'
reading_time_less_one_minute: 'estimeret læsetid: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marker som læst'
toogle_as_star: 'Skift favoritstatus'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Tilbage'
set_as_read: 'Marker som læst'
# set_as_unread: 'Mark as unread'
set_as_favorite: 'Marker som favorit'
set_as_starred: 'Marker som favorit'
view_original_article: 'Originalartikel'
# re_fetch_content: 'Re-fetch content'
delete: 'Slet'
@ -192,6 +194,7 @@ entry:
edit_title: 'Rediger titel'
original_article: 'original'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
created_at: 'Oprettelsesdato'
new:
page_title: 'Gem ny artikel'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'geschätzte Lesezeit: %readingTime% min'
reading_time_less_one_minute: 'geschätzte Lesezeit: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Gelesen-Status ändern'
toogle_as_star: 'Favoriten-Status ändern'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Zurück'
set_as_read: 'Als gelesen markieren'
set_as_unread: 'Als ungelesen markieren'
set_as_favorite: 'Favorisieren'
set_as_starred: 'Favorisieren'
view_original_article: 'Original-Artikel'
re_fetch_content: 'Inhalt neu laden'
delete: 'Löschen'
@ -192,6 +194,7 @@ entry:
edit_title: 'Titel ändern'
original_article: 'original'
annotations_on_the_entry: '{0} Keine Anmerkungen|{1} Eine Anmerkung|]1,Inf[ %nbAnnotations% Anmerkungen'
created_at: 'Erstellungsdatum'
new:
page_title: 'Neuen Artikel speichern'
placeholder: 'https://website.de'
@ -397,7 +400,7 @@ flashes:
entry:
notice:
entry_already_saved: 'Eintrag bereits am %date% gespeichert'
entry_saved: 'Eintag gespeichert'
entry_saved: 'Eintrag gespeichert'
# entry_saved_failed: 'Failed to save entry'
entry_updated: 'Eintrag aktualisiert'
entry_reloaded: 'Eintrag neugeladen'

View file

@ -145,9 +145,11 @@ entry:
reading_time_minutes: 'estimated reading time: %readingTime% min'
reading_time_less_one_minute: 'estimated reading time: <small class="inferieur">&lt;</small> 1 min'
number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Toggle mark as read'
toogle_as_star: 'Toggle favorite'
toogle_as_star: 'Toggle starred'
delete: 'Delete'
export_title: 'Export'
filters:
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Back'
set_as_read: 'Mark as read'
set_as_unread: 'Mark as unread'
set_as_favorite: 'Favorite'
set_as_starred: 'Toggle starred'
view_original_article: 'Original article'
re_fetch_content: 'Re-fetch content'
delete: 'Delete'
@ -192,6 +194,7 @@ entry:
edit_title: 'Edit title'
original_article: 'original'
annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
created_at: 'Creation date'
new:
page_title: 'Save new entry'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'tiempo estimado de lectura: %readingTime% min'
reading_time_less_one_minute: 'tiempo estimado de lectura: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marcar como leído/ no leído'
toogle_as_star: 'Marcar como favorito/ no favorito'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Regrese a la página principal'
set_as_read: 'Marcar como leído'
set_as_unread: 'Marcar como no leído'
set_as_favorite: 'Marcar como favorito'
set_as_starred: 'Marcar como favorito'
view_original_article: 'Artículo original'
re_fetch_content: 'Redescargar el contenido'
delete: 'Suprimir'
@ -192,6 +194,7 @@ entry:
edit_title: 'Modificar el título'
original_article: 'original'
annotations_on_the_entry: '{0} Sin anotaciones|{1} Una anotación|]1,Inf[ %nbAnnotations% anotaciones'
created_at: 'Fecha de creación'
new:
page_title: 'Guardar un nuevo artículo'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'زمان تخمینی برای خواندن: %readingTime% min'
reading_time_less_one_minute: 'زمان تخمینی برای خواندن: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'خوانده‌شده/خوانده‌نشده'
toogle_as_star: 'برگزیده/نابرگزیده'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'بازگشت'
set_as_read: 'خوانده‌شده'
set_as_unread: 'به عنوان خوانده‌نشده علامت بزن'
set_as_favorite: 'برگزیده'
set_as_starred: 'برگزیده'
view_original_article: 'مقالهٔ اصلی'
re_fetch_content: 'مقاله‌ها را دوباره دریافت کن'
delete: 'پاک کردن'
@ -192,6 +194,7 @@ entry:
edit_title: 'ویرایش عنوان'
original_article: 'اصلی'
annotations_on_the_entry: '{0} بدون حاشیه|{1} یک حاشیه|]1,Inf[ %nbحاشیه% annotations'
created_at: 'زمان ساخت'
new:
page_title: 'ذخیرهٔ مقالهٔ تازه'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'durée de lecture: %readingTime% min'
reading_time_less_one_minute: 'durée de lecture: <small class="inferieur">&lt;</small> 1 min'
number_of_tags: '{1}et un autre tag|]1,Inf[et %count% autres tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marquer comme lu/non lu'
toogle_as_star: 'Marquer comme favori'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Retour'
set_as_read: 'Marquer comme lu'
set_as_unread: 'Marquer comme non lu'
set_as_favorite: 'Mettre en favori'
set_as_starred: 'Mettre en favori'
view_original_article: 'Article original'
re_fetch_content: 'Recharger le contenu'
delete: 'Supprimer'
@ -192,6 +194,7 @@ entry:
edit_title: 'Modifier le titre'
original_article: 'original'
annotations_on_the_entry: '{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbAnnotations% annotations'
created_at: 'Date de création'
new:
page_title: 'Sauvegarder un nouvel article'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'tempo di lettura stimato: %readingTime% min'
reading_time_less_one_minute: 'tempo di lettura stimato: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'originale'
toogle_as_read: 'Segna come da leggere'
toogle_as_star: 'Segna come non preferito'
@ -176,7 +178,7 @@ entry:
back_to_homepage: 'Indietro'
set_as_read: 'Segna come già letto'
set_as_unread: 'Segna come da leggere'
set_as_favorite: 'Segna come preferito'
set_as_starred: 'Segna come preferito'
view_original_article: 'Contenuto originale'
re_fetch_content: 'Ri-ottieni pagina'
delete: 'Elimina'
@ -191,6 +193,7 @@ entry:
edit_title: 'Modifica titolo'
original_article: 'originale'
annotations_on_the_entry: '{0} Nessuna annotazione|{1} Una annotazione|]1,Inf[ %nbAnnotations% annotazioni'
created_at: 'Data di creazione'
new:
page_title: 'Salva un nuovo contenuto'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'durada de lectura : %readingTime% min'
reading_time_less_one_minute: 'durada de lectura : <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Marcar coma legit/pas legit'
toogle_as_star: 'Marcar coma favorit'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Tornar'
set_as_read: 'Marcar coma legit'
set_as_unread: 'Marcar coma pas legit'
set_as_favorite: 'Metre en favori'
set_as_starred: 'Metre en favori'
view_original_article: 'Article original'
re_fetch_content: 'Tornar cargar lo contengut'
delete: 'Suprimir'
@ -192,6 +194,7 @@ entry:
edit_title: 'Modificar lo títol'
original_article: 'original'
annotations_on_the_entry: "{0} Pas cap d'anotacion|{1} Una anotacion|]1,Inf[ %nbAnnotations% anotacions"
created_at: 'Data de creacion'
new:
page_title: 'Enregistrar un novèl article'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min'
reading_time_less_one_minute: 'szacunkowy czas czytania: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'oryginał'
toogle_as_read: 'Oznacz jako przeczytane'
toogle_as_star: 'Oznacz jako ulubione'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Cofnij'
set_as_read: 'Oznacz jako przeczytane'
set_as_unread: 'Oznacz jako nieprzeczytane'
set_as_favorite: 'Ulubione'
set_as_starred: 'Ulubione'
view_original_article: 'Oryginalny artykuł'
re_fetch_content: 'Pobierz ponownie treść'
delete: 'Usuń'
@ -192,6 +194,7 @@ entry:
edit_title: 'Edytuj tytuł'
original_article: 'oryginalny'
annotations_on_the_entry: '{0} Nie ma adnotacji |{1} Jedna adnotacja |]1,Inf[ %nbAnnotations% adnotacji'
created_at: 'Czas stworzenia'
new:
page_title: 'Zapisz nowy wpis'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'timp estimat de citire: %readingTime% min'
reading_time_less_one_minute: 'timp estimat de citire: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'original'
toogle_as_read: 'Comută marcat ca citit'
toogle_as_star: 'Comută marcat ca favorit'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Înapoi'
set_as_read: 'Marchează ca citit'
# set_as_unread: 'Mark as unread'
set_as_favorite: 'Favorit'
set_as_starred: 'Favorit'
view_original_article: 'Articol original'
# re_fetch_content: 'Re-fetch content'
delete: 'Șterge'
@ -192,6 +194,7 @@ entry:
edit_title: 'Editează titlul'
original_article: 'original'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
created_at: 'Data creării'
new:
page_title: 'Salvează un nou articol'
placeholder: 'http://website.com'

View file

@ -145,6 +145,8 @@ entry:
reading_time_minutes: 'tahmini okuma süresi: %readingTime% min'
reading_time_less_one_minute: 'tahmini okuma süresi: <small class="inferieur">&lt;</small> 1 min'
# number_of_tags: '{1}and one other tag|]1,Inf[and %count% other tags'
reading_time_minutes_short: '%readingTime% min'
reading_time_less_one_minute_short: '<small class="inferieur">&lt;</small> 1 min'
original_article: 'orijinal'
toogle_as_read: 'Okundu/okunmadı olarak işaretle'
toogle_as_star: 'Favorilere ekle/çıkar'
@ -177,7 +179,7 @@ entry:
back_to_homepage: 'Back'
set_as_read: 'Okundu olarak işaretle'
set_as_unread: 'Okunmadı olarak işaretle'
set_as_favorite: 'Favorilere ekle/çıkar'
set_as_starred: 'Favorilere ekle/çıkar'
view_original_article: 'Orijinal makale'
re_fetch_content: 'İçeriği yenile'
delete: 'Sil'
@ -192,6 +194,7 @@ entry:
edit_title: 'Başlığı düzenle'
original_article: 'orijinal'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
created_at: 'Oluşturulma tarihi'
new:
page_title: 'Yeni makaleyi kaydet'
placeholder: 'http://website.com'

View file

@ -134,7 +134,8 @@
</fieldset>
{% endif %}
{{ form_rest(form.user) }}
{{ form_widget(form.user._token) }}
{{ form_widget(form.user.save) }}
</form>
<h2>{{ 'config.tab_menu.password'|trans }}</h2>

View file

@ -9,26 +9,39 @@
</header>
<div id="article_toolbar">
<ul class="links">
<li class="topPosF"><a href="#top" title="{{ 'entry.view.left_menu.back_to_top'|trans }}" class="tool top icon icon-arrow-up-thick"><span>{{ 'entry.view.left_menu.set_as_read'|trans }}</span></a></li>
<li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li>
<li><a title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>
<li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li>
<li><a title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_favorite'|trans }}</span></a></li>
<li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li>
<li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
{% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %}
{% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %}
{% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
{% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
{% if craue_setting('carrot') %}<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="carrot"><span>Carrot</span></a></li>{% endif %}
{% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %}
{% if craue_setting('export_epub') %}<li><a href="?epub&amp;method=id&amp;value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
{% if craue_setting('export_mobi') %}<li><a href="?mobi&amp;method=id&amp;value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
{% if craue_setting('export_pdf') %}<li><a href="?pdf&amp;method=id&amp;value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
<li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li>
</ul>
</div>
<ul class="links">
<li class="topPosF"><a href="#top" title="{{ 'entry.view.left_menu.back_to_top'|trans }}" class="tool top icon icon-arrow-up-thick"><span>{{ 'entry.view.left_menu.set_as_read'|trans }}</span></a></li>
<li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.domainName|removeWww }}</span></a></li>
<li><a title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" class="tool icon icon-reload" href="{{ path('reload_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>
<li><a title="{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% if entry.isArchived == 0 %}{{ 'entry.view.left_menu.set_as_read'|trans }}{% else %}{{ 'entry.view.left_menu.set_as_unread'|trans }}{% endif %}</span></a></li>
<li><a title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span></a></li>
<li><a id="nav-btn-add-tag" title="{{ 'entry.view.left_menu.add_a_tag'|trans }}"><span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span></a></li>
<li><a title="{{ 'entry.view.left_menu.delete'|trans }}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{{ 'entry.view.left_menu.delete'|trans }}</span></a></li>
{% if craue_setting('share_twitter') %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="Tweet"><span>Tweet</span></a></li>{% endif %}
{% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %}
{% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
{% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
{% if craue_setting('carrot') %}<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="carrot"><span>Carrot</span></a></li>{% endif %}
{% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %}
{% if craue_setting('export_epub') %}<li><a href="?epub&amp;method=id&amp;value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
{% if craue_setting('export_mobi') %}<li><a href="?mobi&amp;method=id&amp;value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
{% if craue_setting('export_pdf') %}<li><a href="?pdf&amp;method=id&amp;value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
<li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.label'|trans }}" class="tool bad-display icon icon-delete"><span>{{ 'entry.view.left_menu.problem.label'|trans }}</span></a></li>
</ul>
</div>
<div class="link mdi-action-today">
{{ 'entry.view.created_at'|trans }}: {{ entry.createdAt|date('Y-m-d') }}
</div>
<div class="link mdi-action-query-builder">
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round})|capitalize }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
{% endif %}
</div>
{% set nbAnnotations = entry.annotations | length %}
<span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
<aside class="tags">
@ -46,6 +59,7 @@
{{ entry.content | raw }}
</article>
</div>
<script id="annotationroutes" type="application/json">
{
"prefix": "",
@ -58,4 +72,22 @@
"entryId": "{{ entry.id }}"
}
</script>
<script src="{{ asset('bundles/wallabagcore/themes/_global/js/restoreScroll.js')}}"></script>
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function(e){
var scrollTop = $(window).scrollTop();
var docHeight = $(document).height();
var scrollPercent = (scrollTop) / (docHeight);
var scrollPercentRounded = Math.round(scrollPercent*100)/100;
savePercent({{ entry.id }}, scrollPercentRounded);
});
retrievePercent({{ entry.id }});
$(window).resize(function(){
retrievePercent({{ entry.id }});
});
});
</script>
{% endblock %}

View file

@ -11,14 +11,14 @@
</ul>
<h3>{{ 'howto.top_menu.browser_addons'|trans }}</h3>
<ul>
<li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
<li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
<li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
<li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
</ul>
<h3>{{ 'howto.top_menu.mobile_apps'|trans }}</h3>
<ul>
<li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
<li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
<li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
<li>Android: <a href="{{ addonsUrl.f_droid }}" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="{{ addonsUrl.google_play }}" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
<li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
<li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
</ul>
<h3>{{ 'howto.top_menu.bookmarklet'|trans }}</h3>
<p>

View file

@ -158,7 +158,7 @@
{% endif %}
{{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
{{ form_rest(form.user) }}
{{ form_widget(form.user._token) }}
</form>
</div>

View file

@ -93,7 +93,7 @@
<ul class="tools right">
<li>
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}favorite_border{% else %}favorite{% endif %}</i></a>
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
<a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
</li>
</ul>

View file

@ -24,8 +24,8 @@
</a>
</li>
<li>
<a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
<i class="material-icons small">{% if entry.isStarred == 0 %}favorite_outline{% else %}favorite{% endif %}</i>
<a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
<i class="material-icons small">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
</a>
</li>
<li>
@ -70,9 +70,9 @@
</li>
<li class="bold hide-on-med-and-down">
<a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_favorite'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
<i class="material-icons spall">{% if entry.isStarred == 0 %}favorite_outline{% else %}favorite{% endif %}</i>
<span>{{ 'entry.view.left_menu.set_as_favorite'|trans }}</span>
<a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav">
<i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
<span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span>
</a>
<div class="collapsible-body"></div>
</li>
@ -194,6 +194,15 @@
<h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header>
<aside>
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<span class="link mdi-action-query-builder">
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
{% endif %}
</span>
<span class="link mdi-action-today" title="{{ 'entry.view.created_at'|trans }}"> {{ entry.createdAt|date('Y-m-d') }}</span>
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
<span class="link"><i class="material-icons link">link</i> {{ entry.domainName|removeWww }}</span></a>
<span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>

View file

@ -18,17 +18,17 @@
<div class="col s12">
<h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5>
<ul>
<li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
<li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
<li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
<li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
</ul>
</div>
<div class="col s12">
<h5>{{ 'howto.top_menu.mobile_apps'|trans }}</h5>
<ul>
<li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
<li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
<li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
<li>Android: <a href="{{ addonsUrl.f_droid }}" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="{{ addonsUrl.google_play }}" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
<li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
<li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
</ul>
</div>

View file

@ -0,0 +1,41 @@
<footer class="page-footer cyan darken-2">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
<p class="grey-text text-lighten-4">
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.google_play }}" title="Android">
<span class="icon-android"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.ios }}" title="iOS">
<span class="icon-apple"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.firefox }}" title="Firefox">
<span class="icon-firefox"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.chrome }}" title="Chrome">
<span class="icon-chrome"></span>
</a>
</p>
</div>
<div class="col l4 offset-l2 s12">
<h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
<a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.twitter }}" title="Twitter">
<span class="icon-twitter"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.google_plus }}" title="Google+">
<span class="icon-google-plus2"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.facebook }}" title="Facebook">
<span class="icon-facebook2"></span>
</a>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
<p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
<a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
</div>
</div>
</footer>

View file

@ -26,7 +26,7 @@
<ul id="slide-out" class="side-nav fixed">
{% block logo %}
<li class="logo border-bottom">
<a title="{% trans %}Back to unread articles{% endtrans %}" href="{{ path('unread') }}">
<a title="{{ 'menu.left.back_to_unread'|trans }}" href="{{ path('unread') }}">
<img src="{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}" alt="wallabag logo" />
</a>
</li>
@ -117,45 +117,5 @@
{% endblock %}
{% block footer %}
<footer class="page-footer cyan darken-2">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
<p class="grey-text text-lighten-4">
<a target="_blank" class="grey-text text-lighten-3" href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="Android">
<span class="icon-android"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="https://itunes.apple.com/app/id828331015" title="iOS">
<span class="icon-apple"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" title="Firefox">
<span class="icon-firefox"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj" title="Chrome">
<span class="icon-chrome"></span>
</a>
</p>
</div>
<div class="col l4 offset-l2 s12">
<h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
<a target="_blank" class="grey-text text-lighten-3" href="https://twitter.com/wallabagapp" title="Twitter">
<span class="icon-twitter"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="https://plus.google.com/+WallabagOrg/posts" title="Google+">
<span class="icon-google-plus2"></span>
</a>
<a target="_blank" class="grey-text text-lighten-3" href="https://facebook.com/Wallabag" title="Facebook">
<span class="icon-facebook2"></span>
</a>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
<p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
<a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
</div>
</div>
</footer>
{{ render(controller("WallabagCoreBundle:Footer:index")) }}
{% endblock %}

View file

@ -0,0 +1,47 @@
<?php
namespace Wallabag\ImportBundle\Import;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Doctrine\ORM\EntityManager;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Entity\Entry;
abstract class AbstractImport implements ImportInterface
{
protected $em;
protected $logger;
protected $contentProxy;
public function __construct(EntityManager $em, ContentProxy $contentProxy)
{
$this->em = $em;
$this->logger = new NullLogger();
$this->contentProxy = $contentProxy;
}
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* Fetch content from the ContentProxy (using graby).
* If it fails return false instead of the updated entry.
*
* @param Entry $entry Entry to update
* @param string $url Url to grab content for
* @param array $content An array with AT LEAST keys title, html, url, language & content_type to skip the fetchContent from the url
*
* @return Entry|false
*/
protected function fetchContent(Entry $entry, $url, array $content = [])
{
try {
return $this->contentProxy->updateEntry($entry, $url, $content);
} catch (\Exception $e) {
return false;
}
}
}

View file

@ -2,7 +2,6 @@
namespace Wallabag\ImportBundle\Import;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Doctrine\ORM\EntityManager;
use GuzzleHttp\Client;
@ -12,12 +11,9 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Craue\ConfigBundle\Util\Config;
class PocketImport implements ImportInterface
class PocketImport extends AbstractImport
{
private $user;
private $em;
private $contentProxy;
private $logger;
private $client;
private $consumerKey;
private $skippedEntries = 0;
@ -34,11 +30,6 @@ class PocketImport implements ImportInterface
$this->logger = new NullLogger();
}
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* {@inheritdoc}
*/
@ -219,14 +210,20 @@ class PocketImport implements ImportInterface
}
$entry = new Entry($this->user);
$entry = $this->contentProxy->updateEntry($entry, $url);
$entry = $this->fetchContent($entry, $url);
// jump to next entry in case of problem while getting content
if (false === $entry) {
++$this->skippedEntries;
continue;
}
// 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted
if ($pocketEntry['status'] == 1 || $this->markAsRead) {
$entry->setArchived(true);
}
// 0 or 1 - 1 If the item is favorited
// 0 or 1 - 1 If the item is starred
if ($pocketEntry['favorite'] == 1) {
$entry->setStarred(true);
}

View file

@ -2,19 +2,12 @@
namespace Wallabag\ImportBundle\Import;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Doctrine\ORM\EntityManager;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Helper\ContentProxy;
abstract class WallabagImport implements ImportInterface
abstract class WallabagImport extends AbstractImport
{
protected $user;
protected $em;
protected $logger;
protected $contentProxy;
protected $skippedEntries = 0;
protected $importedEntries = 0;
protected $filepath;
@ -35,18 +28,6 @@ abstract class WallabagImport implements ImportInterface
'',
];
public function __construct(EntityManager $em, ContentProxy $contentProxy)
{
$this->em = $em;
$this->logger = new NullLogger();
$this->contentProxy = $contentProxy;
}
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
/**
* We define the user in a custom call because on the import command there is no logged in user.
* So we can't retrieve user from the `security.token_storage` service.
@ -159,12 +140,18 @@ abstract class WallabagImport implements ImportInterface
$data = $this->prepareEntry($importedEntry, $this->markAsRead);
$entry = $this->contentProxy->updateEntry(
$entry = $this->fetchContent(
new Entry($this->user),
$importedEntry['url'],
$data
);
// jump to next entry in case of problem while getting content
if (false === $entry) {
++$this->skippedEntries;
continue;
}
if (array_key_exists('tags', $data)) {
$this->contentProxy->assignTagsToEntry(
$entry,