aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-10 21:48:11 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-08-23 16:49:21 +0200
commitd0545b6bd6edc38bf06604900b1e20a60e7c8583 (patch)
treeb137a06de8859e501b658a3e3f78f316332a051b /src
parentf3d0cb91063840f2b05c63954d3fef3e5b8943fd (diff)
downloadwallabag-d0545b6bd6edc38bf06604900b1e20a60e7c8583.tar.gz
wallabag-d0545b6bd6edc38bf06604900b1e20a60e7c8583.tar.zst
wallabag-d0545b6bd6edc38bf06604900b1e20a60e7c8583.zip
Add migration
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php5
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php5
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php5
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig3
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig2
5 files changed, 16 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index e134ced5..143def4f 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -242,6 +242,11 @@ class InstallCommand extends ContainerAwareCommand
242 242
243 $settings = [ 243 $settings = [
244 [ 244 [
245 'name' => 'share_public',
246 'value' => '1',
247 'section' => 'entry',
248 ],
249 [
245 'name' => 'carrot', 250 'name' => 'carrot',
246 'value' => '1', 251 'value' => '1',
247 'section' => 'entry', 252 'section' => 'entry',
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index a78dd00c..e3b4b1eb 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -451,10 +451,9 @@ class EntryController extends Controller
451 private function checkIfEntryAlreadyExists(Entry $entry) 451 private function checkIfEntryAlreadyExists(Entry $entry)
452 { 452 {
453 return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId()); 453 return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
454
455 } 454 }
456 455
457 /* 456 /**
458 * Share entry content. 457 * Share entry content.
459 * 458 *
460 * @param Entry $entry 459 * @param Entry $entry
@@ -463,7 +462,7 @@ class EntryController extends Controller
463 * 462 *
464 * @return \Symfony\Component\HttpFoundation\Response 463 * @return \Symfony\Component\HttpFoundation\Response
465 */ 464 */
466 public function shareEntry(Entry $entry) 465 public function shareEntryAction(Entry $entry)
467 { 466 {
468 return $this->render( 467 return $this->render(
469 '@WallabagCore/themes/share.html.twig', 468 '@WallabagCore/themes/share.html.twig',
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
index 09058796..b4309304 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
@@ -16,6 +16,11 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
16 { 16 {
17 $settings = [ 17 $settings = [
18 [ 18 [
19 'name' => 'share_public',
20 'value' => '1',
21 'section' => 'entry',
22 ],
23 [
19 'name' => 'carrot', 24 'name' => 'carrot',
20 'value' => '1', 25 'value' => '1',
21 'section' => 'entry', 26 'section' => 'entry',
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 ce47a677..61b871f0 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
@@ -17,6 +17,9 @@
17 <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> 17 <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>
18 <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> 18 <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>
19 <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> 19 <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>
20 {% if craue_setting('share_public') %}
21 <li><a href="{{ path('share', {'uuid': entry.uuid }) }}" target="_blank" class="tool public" title="public"><span>public</span></a></li>
22 {% endif %}
20 {% 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 %} 23 {% 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 %}
21 {% 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 %} 24 {% 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 %}
22 {% 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 %} 25 {% 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 %}
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 b634dd40..d05bdd08 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
@@ -99,7 +99,7 @@
99 </a> 99 </a>
100 <div class="collapsible-body"> 100 <div class="collapsible-body">
101 <ul> 101 <ul>
102 {% if craue_setting('share_twitter') %} 102 {% if craue_setting('share_public') %}
103 <li> 103 <li>
104 <a href="{{ path('share', {'uuid': entry.uuid }) }}" target="_blank" class="tool public" title="public"> 104 <a href="{{ path('share', {'uuid': entry.uuid }) }}" target="_blank" class="tool public" title="public">
105 <span>public</span> 105 <span>public</span>