diff options
18 files changed, 72 insertions, 2 deletions
diff --git a/app/DoctrineMigrations/Version20171125164500.php b/app/DoctrineMigrations/Version20171125164500.php new file mode 100644 index 00000000..980e0e75 --- /dev/null +++ b/app/DoctrineMigrations/Version20171125164500.php | |||
@@ -0,0 +1,52 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\AbstractMigration; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
8 | use Symfony\Component\DependencyInjection\ContainerInterface; | ||
9 | |||
10 | /** | ||
11 | * Add shaarli_share_origin_url in craue_config_setting. | ||
12 | */ | ||
13 | class Version20171125164500 extends AbstractMigration implements ContainerAwareInterface | ||
14 | { | ||
15 | /** | ||
16 | * @var ContainerInterface | ||
17 | */ | ||
18 | private $container; | ||
19 | |||
20 | public function setContainer(ContainerInterface $container = null) | ||
21 | { | ||
22 | $this->container = $container; | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * @param Schema $schema | ||
27 | */ | ||
28 | public function up(Schema $schema) | ||
29 | { | ||
30 | $shaarliShareOriginUrl = $this->container | ||
31 | ->get('doctrine.orm.default_entity_manager') | ||
32 | ->getConnection() | ||
33 | ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'"); | ||
34 | |||
35 | $this->skipIf(false !== $shaarliShareOriginUrl, 'It seems that you already played this migration.'); | ||
36 | |||
37 | $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')"); | ||
38 | } | ||
39 | |||
40 | /** | ||
41 | * @param Schema $schema | ||
42 | */ | ||
43 | public function down(Schema $schema) | ||
44 | { | ||
45 | $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';"); | ||
46 | } | ||
47 | |||
48 | private function getTable($tableName) | ||
49 | { | ||
50 | return $this->container->getParameter('database_table_prefix') . $tableName; | ||
51 | } | ||
52 | } | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml index c3fd843f..6d6a60d6 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml | |||
@@ -37,3 +37,4 @@ demo_mode_username: "Demobruger" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml index 37da383e..58d024ef 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: 'Bilder lokal herunterladen' | |||
37 | restricted_access: 'Authentifizierung für Webseiten mit Paywall aktivieren' | 37 | restricted_access: 'Authentifizierung für Webseiten mit Paywall aktivieren' |
38 | api_user_registration: 'Registrierung eines Benutzers über die API ermöglichen' | 38 | api_user_registration: 'Registrierung eines Benutzers über die API ermöglichen' |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml index 0a89ce2c..a26e451f 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Download images locally | |||
37 | restricted_access: Enable authentication for paywalled websites | 37 | restricted_access: Enable authentication for paywalled websites |
38 | api_user_registration: Enable user to be registered using the API | 38 | api_user_registration: Enable user to be registered using the API |
39 | store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled \ No newline at end of file | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml index db5858d6..f9bd27f2 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Descargar imágenes localmente | |||
37 | restricted_access: Activar autenticación para websites con paywall | 37 | restricted_access: Activar autenticación para websites con paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml index 11cc601b..15e4d6fd 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml | |||
@@ -37,3 +37,4 @@ modify_settings: "اعمال" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml index f23b5bf9..fe91044a 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Télécharger les images en local | |||
37 | restricted_access: Activer l'authentification pour les articles derrière un paywall | 37 | restricted_access: Activer l'authentification pour les articles derrière un paywall |
38 | api_user_registration: Activer la création de compte depuis l'API | 38 | api_user_registration: Activer la création de compte depuis l'API |
39 | store_article_headers: Activer le stockage des en-têtes HTTP de chaque article | 39 | store_article_headers: Activer le stockage des en-têtes HTTP de chaque article |
40 | shaarli_share_origin_url: Activer le partage de l'adresse d'origine vers Shaarli, si le service est activé | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml index ade6f7da..3d5681fb 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml | |||
@@ -37,3 +37,4 @@ demo_mode_username: "Utente Demo" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | api_user_registration: Abilita la registrazione dell'utente attraverso l'API | 38 | api_user_registration: Abilita la registrazione dell'utente attraverso l'API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml index 99986642..4c99652a 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: Telecargar los imatges en local | |||
37 | restricted_access: Activar l'autenticacion pels sites amb peatge | 37 | restricted_access: Activar l'autenticacion pels sites amb peatge |
38 | api_user_registration: Autorizar los utilizaires a se marcar amb l'API | 38 | api_user_registration: Autorizar los utilizaires a se marcar amb l'API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml index 8b8f2ebd..7c125fcf 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml | |||
@@ -36,3 +36,4 @@ download_images_enabled: Pobierz obrazy lokalnie | |||
36 | restricted_access: Włącz autoryzację dla stron z paywallem | 36 | restricted_access: Włącz autoryzację dla stron z paywallem |
37 | api_user_registration: Włącz rejestrację użytkownika przy użyciu API | 37 | api_user_registration: Włącz rejestrację użytkownika przy użyciu API |
38 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 38 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
39 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml index 76cb0174..a81eda0e 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml | |||
@@ -37,3 +37,4 @@ demo_mode_username: "Usuário demo" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml index 8300cec8..9d927cc0 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml | |||
@@ -37,3 +37,4 @@ modify_settings: "aplică" | |||
37 | # restricted_access: Enable authentication for websites with paywall | 37 | # restricted_access: Enable authentication for websites with paywall |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml index 8fed84ae..2eb7b237 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ru.yml | |||
@@ -37,3 +37,4 @@ download_images_enabled: "Скачивать изображения локаль | |||
37 | restricted_access: "Включить авторизацию на сайте с помощью paywall" | 37 | restricted_access: "Включить авторизацию на сайте с помощью paywall" |
38 | # api_user_registration: Enable user to be registered using the API | 38 | # api_user_registration: Enable user to be registered using the API |
39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 39 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
40 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml index 4e4d3234..93c0d6b4 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.th.yml | |||
@@ -34,3 +34,4 @@ share_public: ยอมรับ URL สาธารณะจากการเ | |||
34 | download_images_enabled: ดาวน์โหลดรูปภาพเฉพาะ | 34 | download_images_enabled: ดาวน์โหลดรูปภาพเฉพาะ |
35 | restricted_access: เปิดใช้งานการรองรับบนเว็บไซต์กับ paywall | 35 | restricted_access: เปิดใช้งานการรองรับบนเว็บไซต์กับ paywall |
36 | api_user_registration: เปิดใช้งานให้ผู้ใช้ลงทะเบียนการใช้ API | 36 | api_user_registration: เปิดใช้งานให้ผู้ใช้ลงทะเบียนการใช้ API |
37 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml index b992ccc2..6de880ec 100644 --- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml +++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml | |||
@@ -38,3 +38,4 @@ | |||
38 | # restricted_access: Enable authentication for websites with paywall | 38 | # restricted_access: Enable authentication for websites with paywall |
39 | # api_user_registration: Enable user to be registered using the API | 39 | # api_user_registration: Enable user to be registered using the API |
40 | # store_article_headers: Enable if wallabag stores HTTP headers for each article | 40 | # store_article_headers: Enable if wallabag stores HTTP headers for each article |
41 | # shaarli_share_origin_url: Enable sharing origin url to Shaarli, if the service is enabled | ||
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index ec6aae63..978a48f4 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml | |||
@@ -158,6 +158,10 @@ wallabag_core: | |||
158 | name: store_article_headers | 158 | name: store_article_headers |
159 | value: 0 | 159 | value: 0 |
160 | section: entry | 160 | section: entry |
161 | - | ||
162 | name: shaarli_share_origin_url | ||
163 | value: 0 | ||
164 | section: entry | ||
161 | 165 | ||
162 | wallabag_user: | 166 | wallabag_user: |
163 | registration_enabled: "%fosuser_registration%" | 167 | registration_enabled: "%fosuser_registration%" |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 0c7cbaa6..7ff24dfd 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | |||
@@ -29,7 +29,7 @@ | |||
29 | {% endif %} | 29 | {% endif %} |
30 | {% 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 %} | 30 | {% 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 %} |
31 | {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %} | 31 | {% if craue_setting('share_mail') %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="Email"><span>Email</span></a></li>{% endif %} |
32 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&tags={{ entry.tags|join(',')|url_encode }}" target="_blank" class="tool icon-image icon-image--shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} | 32 | {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&tags={{ entry.tags|join(',')|url_encode }}{% if craue_setting('shaarli_share_origin_url') %}&original_url={{ entry.originUrl|url_encode }}{% endif %}" target="_blank" class="tool icon-image icon-image--shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} |
33 | {% if craue_setting('share_scuttle') %}<li><a href="{{ craue_setting('scuttle_url') }}/bookmarks.php?action=add&address={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&tags={{ entry.tags|join(',')|url_encode }}" target="_blank" class="tool icon-image icon-image--scuttle" title="scuttle"><span>scuttle</span></a></li>{% endif %} | 33 | {% if craue_setting('share_scuttle') %}<li><a href="{{ craue_setting('scuttle_url') }}/bookmarks.php?action=add&address={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&tags={{ entry.tags|join(',')|url_encode }}" target="_blank" class="tool icon-image icon-image--scuttle" title="scuttle"><span>scuttle</span></a></li>{% endif %} |
34 | {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %} | 34 | {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %} |
35 | {% if craue_setting('share_unmark') %}<li><a href="{{ craue_setting('unmark_url') }}/mark/add?url={{ entry.url|url_encode }}&title={{entry.title|url_encode}}&v=6" target="_blank" class="tool unmark icon-image icon-image--unmark" title="unmark"><span>unmark.it</span></a></li>{% endif %} | 35 | {% if craue_setting('share_unmark') %}<li><a href="{{ craue_setting('unmark_url') }}/mark/add?url={{ entry.url|url_encode }}&title={{entry.title|url_encode}}&v=6" target="_blank" class="tool unmark icon-image icon-image--unmark" title="unmark"><span>unmark.it</span></a></li>{% endif %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 019569f7..bd9eb0d7 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -125,7 +125,7 @@ | |||
125 | {% endif %} | 125 | {% endif %} |
126 | {% if craue_setting('share_shaarli') %} | 126 | {% if craue_setting('share_shaarli') %} |
127 | <li> | 127 | <li> |
128 | <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}&lf_original_url={{ entry.originUrl|url_encode }}" target="_blank" title="shaarli" class="tool icon-image shaarli"> | 128 | <a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}{% if craue_setting('shaarli_share_origin_url') %}&original_url={{ entry.originUrl|url_encode }}{% endif %}" target="_blank" title="shaarli" class="tool icon-image shaarli"> |
129 | <span>shaarli</span> | 129 | <span>shaarli</span> |
130 | </a> | 130 | </a> |
131 | </li> | 131 | </li> |