]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1295 from wallabag/v2-howto
authorJeremy Benoist <j0k3r@users.noreply.github.com>
Mon, 10 Aug 2015 12:15:11 +0000 (14:15 +0200)
committerJeremy Benoist <j0k3r@users.noreply.github.com>
Mon, 10 Aug 2015 12:15:11 +0000 (14:15 +0200)
add howto page

src/Wallabag/CoreBundle/Controller/StaticController.php
src/Wallabag/CoreBundle/Resources/views/Static/howto.html.twig [new file with mode: 0644]
src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig [new file with mode: 0644]
src/Wallabag/CoreBundle/Resources/views/themes/material/base.html.twig
src/Wallabag/CoreBundle/Tests/Controller/StaticControllerTest.php [new file with mode: 0644]

index 07931f582ae491d77cd89becd0dbe4184c96d74c..09be1b74f87606d0cb0b064665c572db6a41ee16 100644 (file)
@@ -7,6 +7,16 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 
 class StaticController extends Controller
 {
+    /**
+     * @Route("/howto", name="howto")
+     */
+     public function howtoAction()
+     {
+         return $this->render(
+             'WallabagCoreBundle:Static:howto.html.twig',
+             array()
+         );
+     }
     /**
      * @Route("/about", name="about")
      */
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 (file)
index 0000000..f25acb5
--- /dev/null
@@ -0,0 +1,28 @@
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+
+{% block title %}{% trans %}Howto{% endtrans %}{% endblock %}
+
+{% block content %}
+    <h2>{% trans %}Howto{% endtrans %}</h2>
+
+    <p>{% trans %}There are several ways to save an article:{% endtrans %}</p>
+    <ul>
+        <li><a href="{{ path('about') }}">{% trans %}Thanks to this form{% endtrans %}</a></li>
+    </ul>
+    <h3>{% trans %}Browser Addons{% endtrans %}</h3>
+    <ul>
+        <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans %}Standard Firefox Add-On{% endtrans %}</a></li>
+        <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans %}Chrome Extension{% endtrans %}</a></li>
+    </ul>
+    <h3>{% trans %}Mobile Apps{% endtrans %}</h3>
+    <ul>
+        <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>
+        <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
+        <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>
+    </ul>
+    <h3>{% trans %}Bookmarklet{% endtrans %}</h3>
+    <p>
+    {% trans %}Drag &amp; drop this link to your bookmarks bar:{% endtrans %} {% trans %}bag it!{% endtrans %}
+    </p>
+
+{% 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 (file)
index 0000000..245d14e
--- /dev/null
@@ -0,0 +1,53 @@
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+
+{% block title %}{% trans %}Howto{% endtrans %}{% endblock %}
+
+{% block content %}
+
+    <div class="row">
+        <div class="col s12">
+            <div class="card-panel settings">
+
+                <div class="row">
+                    <div class="div_tabs col s12">
+                        <ul class="tabs">
+                        <li class="tab col s3"><a class="active" href="#set1">{% trans %}Form{% endtrans %}</a></li>
+                        <li class="tab col s3"><a href="#set2">{% trans %}Browser addons{% endtrans %}</a></li>
+                        <li class="tab col s3"><a href="#set3">{% trans %}Mobile apps{% endtrans %}</a></li>
+                        <li class="tab col s3"><a href="#set4">{% trans %}Bookmarklet{% endtrans %}</a></li>
+                        </ul>
+                    </div>
+
+
+                    <div id="set1" class="col s12">
+                        <a href="{{ path('about') }}">{% trans %}Thanks to this form{% endtrans %}</a>
+                    </div>
+
+
+                    <div id="set2" class="col s12">
+                        <ul>
+                            <li><a href="https://addons.mozilla.org/firefox/addon/wallabag/" target="_blank">{% trans %}Standard Firefox Add-On{% endtrans %}</a></li>
+                            <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{% trans %}Chrome Extension{% endtrans %}</a></li>
+                        </ul>
+                    </div>
+
+
+                    <div id="set3" class="col s12">
+                        <ul>
+                            <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>
+                            <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{% trans %}download the application{% endtrans %}</a></li>
+                            <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>
+                        </ul>
+                    </div>
+
+
+                    <div id="set4" class="col s12">
+                        {% trans %}Drag &amp; drop this link to your bookmarks bar:{% endtrans %} {% trans %}bag it!{% endtrans %}
+                    </div>
+
+                </div>
+
+            </div>
+        </div>
+    </div>
+{% endblock %}
index 7070a399349f4b1f44d01901d1099dbf5c9b0baf..8c9421656d2cf5728096fbc7a1059f21150732d4 100644 (file)
@@ -76,6 +76,7 @@
                         <li class="bold {% if currentRoute == 'archive' %}active{% endif %}"><a class="waves-effect" href="{{ path('archive') }}">{% trans %}archive{% endtrans %}</a></li>
                         <li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
                         <li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
+                        <li class="bold {% if currentRoute == 'howto' %}active{% endif %}"><a class="waves-effect" href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
                         <li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
                     </ul>
                     <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 (file)
index 0000000..6d7976c
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+namespace Wallabag\CoreBundle\Tests\Controller;
+
+use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
+
+class StaticControllerTest extends WallabagCoreTestCase
+{
+    public function testAbout()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $client->request('GET', '/about');
+
+        $this->assertEquals(200, $client->getResponse()->getStatusCode());
+    }
+
+    public function testHowto()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $client->request('GET', '/howto');
+
+        $this->assertEquals(200, $client->getResponse()->getStatusCode());
+    }
+}