aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorAlexandr Danilov <bitbucket@modos189.ru>2015-08-10 15:25:23 +0300
committerAlexandr Danilov <bitbucket@modos189.ru>2015-08-10 15:25:23 +0300
commit0e654f62730e233f586a4efee0d654311a498b9e (patch)
tree1774492e41b73c185a62842148806af0c35e300c /src/Wallabag
parent4919584b8758b23e127536b686776c1c41b3d215 (diff)
parentf48a0189290ae6dbdb0412a3abd95acd257e55cd (diff)
downloadwallabag-0e654f62730e233f586a4efee0d654311a498b9e.tar.gz
wallabag-0e654f62730e233f586a4efee0d654311a498b9e.tar.zst
wallabag-0e654f62730e233f586a4efee0d654311a498b9e.zip
Merge remote-tracking branch 'origin/v2' into v2_fix_material
# Conflicts: # src/Wallabag/CoreBundle/Resources/views/themes/material/base.html.twig
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/StaticController.php10
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig28
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig53
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig5
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/StaticControllerTest.php28
5 files changed, 122 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php
index 07931f58..09be1b74 100644
--- a/src/Wallabag/CoreBundle/Controller/StaticController.php
+++ b/src/Wallabag/CoreBundle/Controller/StaticController.php
@@ -8,6 +8,16 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8class StaticController extends Controller 8class StaticController extends Controller
9{ 9{
10 /** 10 /**
11 * @Route("/howto", name="howto")
12 */
13 public function howtoAction()
14 {
15 return $this->render(
16 'WallabagCoreBundle:Static:howto.html.twig',
17 array()
18 );
19 }
20 /**
11 * @Route("/about", name="about") 21 * @Route("/about", name="about")
12 */ 22 */
13 public function aboutAction() 23 public function aboutAction()
diff --git a/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig
new file mode 100644
index 00000000..f25acb5d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig
@@ -0,0 +1,28 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}Howto{% endtrans %}{% endblock %}
4
5{% block content %}
6 <h2>{% trans %}Howto{% endtrans %}</h2>
7
8 <p>{% trans %}There are several ways to save an article:{% endtrans %}</p>
9 <ul>
10 <li><a href="{{ path('about') }}">{% trans %}Thanks to this form{% endtrans %}</a></li>
11 </ul>
12 <h3>{% trans %}Browser Addons{% endtrans %}</h3>
13 <ul>
14 <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans %}Standard Firefox Add-On{% endtrans %}</a></li>
15 <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans %}Chrome Extension{% endtrans %}</a></li>
16 </ul>
17 <h3>{% trans %}Mobile Apps{% endtrans %}</h3>
18 <ul>
19 <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{% trans %}via F-Droid{% endtrans %}</a> {% trans %} or {% endtrans %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{% trans %}via Google Play{% endtrans %}</a></li>
20 <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
21 <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
22 </ul>
23 <h3>{% trans %}Bookmarklet{% endtrans %}</h3>
24 <p>
25 {% trans %}Drag &amp; drop this link to your bookmarks bar:{% endtrans %} {% trans %}bag it!{% endtrans %}
26 </p>
27
28{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig
new file mode 100644
index 00000000..245d14e3
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig
@@ -0,0 +1,53 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}Howto{% endtrans %}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel settings">
10
11 <div class="row">
12 <div class="div_tabs col s12">
13 <ul class="tabs">
14 <li class="tab col s3"><a class="active" href="#set1">{% trans %}Form{% endtrans %}</a></li>
15 <li class="tab col s3"><a href="#set2">{% trans %}Browser addons{% endtrans %}</a></li>
16 <li class="tab col s3"><a href="#set3">{% trans %}Mobile apps{% endtrans %}</a></li>
17 <li class="tab col s3"><a href="#set4">{% trans %}Bookmarklet{% endtrans %}</a></li>
18 </ul>
19 </div>
20
21
22 <div id="set1" class="col s12">
23 <a href="{{ path('about') }}">{% trans %}Thanks to this form{% endtrans %}</a>
24 </div>
25
26
27 <div id="set2" class="col s12">
28 <ul>
29 <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans %}Standard Firefox Add-On{% endtrans %}</a></li>
30 <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans %}Chrome Extension{% endtrans %}</a></li>
31 </ul>
32 </div>
33
34
35 <div id="set3" class="col s12">
36 <ul>
37 <li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{% trans %}via F-Droid{% endtrans %}</a> {% trans %} or {% endtrans %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{% trans %}via Google Play{% endtrans %}</a></li>
38 <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
39 <li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
40 </ul>
41 </div>
42
43
44 <div id="set4" class="col s12">
45 {% trans %}Drag &amp; drop this link to your bookmarks bar:{% endtrans %} {% trans %}bag it!{% endtrans %}
46 </div>
47
48 </div>
49
50 </div>
51 </div>
52 </div>
53{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index 8a49190e..2b32c2f9 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -40,10 +40,11 @@
40 {% set currentRoute = app.request.attributes.get('_route') %} 40 {% set currentRoute = app.request.attributes.get('_route') %}
41 41
42 <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"><a class="waves-effect" href="{{ path('unread') }}">{% trans %}unread{% endtrans %}</a></li> 42 <li class="bold {% if currentRoute == 'unread' or currentRoute == 'homepage' %}active{% endif %}"><a class="waves-effect" href="{{ path('unread') }}">{% trans %}unread{% endtrans %}</a></li>
43 <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"><a class="waves-effect" href="{{ path('starred') }}">{% trans %}favorites{% endtrans %}</a></li> 43 <li class="bold {% if currentRoute == 'starred' %}active{% endif %}"><a class="waves-effect" href="{{ path('starred') }}">{% trans %}starred{% endtrans %}</a></li>
44 <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li> 44 <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li>
45 <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="?view=tags">{% trans %}tags{% endtrans %}</a></li> 45 <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
46 <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li> 46 <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
47 <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"><a class="waves-effect" href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
47 <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li> 48 <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
48 </ul> 49 </ul>
49 <div class="nav-wrapper nav-panels"> 50 <div class="nav-wrapper nav-panels">
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/StaticControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/StaticControllerTest.php
new file mode 100644
index 00000000..6d7976c4
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Tests/Controller/StaticControllerTest.php
@@ -0,0 +1,28 @@
1<?php
2
3namespace Wallabag\CoreBundle\Tests\Controller;
4
5use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
6
7class StaticControllerTest extends WallabagCoreTestCase
8{
9 public function testAbout()
10 {
11 $this->logInAs('admin');
12 $client = $this->getClient();
13
14 $client->request('GET', '/about');
15
16 $this->assertEquals(200, $client->getResponse()->getStatusCode());
17 }
18
19 public function testHowto()
20 {
21 $this->logInAs('admin');
22 $client = $this->getClient();
23
24 $client->request('GET', '/howto');
25
26 $this->assertEquals(200, $client->getResponse()->getStatusCode());
27 }
28}