aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-10 14:15:11 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-08-10 14:15:11 +0200
commitf48a0189290ae6dbdb0412a3abd95acd257e55cd (patch)
treea925b2db485815937d841ef46061a797dbcf827a /src
parent47cadf36c8f7c20ba1edf26e184637d33a52cf35 (diff)
parentb958d9e59b7aa23adbcd55e78277dade70fc3c9e (diff)
downloadwallabag-f48a0189290ae6dbdb0412a3abd95acd257e55cd.tar.gz
wallabag-f48a0189290ae6dbdb0412a3abd95acd257e55cd.tar.zst
wallabag-f48a0189290ae6dbdb0412a3abd95acd257e55cd.zip
Merge pull request #1295 from wallabag/v2-howto
add howto page
Diffstat (limited to 'src')
-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/base.html.twig1
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/StaticControllerTest.php28
5 files changed, 120 insertions, 0 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/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/base.html.twig
index 7070a399..8c942165 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/base.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/base.html.twig
@@ -76,6 +76,7 @@
76 <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li> 76 <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li>
77 <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li> 77 <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
78 <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li> 78 <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
79 <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"><a class="waves-effect" href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
79 <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li> 80 <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
80 </ul> 81 </ul>
81 <div class="nav-wrapper nav-panels"> 82 <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}