aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2020-04-22 10:05:12 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2020-04-29 16:39:29 +0200
commite101052afc69efb18c413776e39a0281576c4ca4 (patch)
tree4f2fce3cd458d11f62b6db55eff6ac5b445db019 /src
parent0914a6f2fd33aeda6100e4d94c3ea3cec942f5f0 (diff)
downloadwallabag-e101052afc69efb18c413776e39a0281576c4ca4.tar.gz
wallabag-e101052afc69efb18c413776e39a0281576c4ca4.tar.zst
wallabag-e101052afc69efb18c413776e39a0281576c4ca4.zip
First draft
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php8
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig9
2 files changed, 12 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 9b2954e7..5fc6fc55 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -7,6 +7,7 @@ use Pagerfanta\Adapter\DoctrineORMAdapter;
7use Pagerfanta\Exception\OutOfRangeCurrentPageException; 7use Pagerfanta\Exception\OutOfRangeCurrentPageException;
8use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; 8use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
9use Symfony\Bundle\FrameworkBundle\Controller\Controller; 9use Symfony\Bundle\FrameworkBundle\Controller\Controller;
10use Symfony\Component\HttpFoundation\JsonResponse;
10use Symfony\Component\HttpFoundation\Request; 11use Symfony\Component\HttpFoundation\Request;
11use Symfony\Component\Routing\Annotation\Route; 12use Symfony\Component\Routing\Annotation\Route;
12use Symfony\Component\Routing\Generator\UrlGeneratorInterface; 13use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
@@ -371,6 +372,11 @@ class EntryController extends Controller
371 $message = 'flashes.entry.notice.entry_archived'; 372 $message = 'flashes.entry.notice.entry_archived';
372 } 373 }
373 374
375 if ($request->query->get('some_var_name')) {
376
377 return new JsonResponse($this->get('translator')->trans($message));
378 }
379
374 $this->get('session')->getFlashBag()->add( 380 $this->get('session')->getFlashBag()->add(
375 'notice', 381 'notice',
376 $message 382 $message
@@ -381,6 +387,8 @@ class EntryController extends Controller
381 return $this->redirect($redirectUrl); 387 return $this->redirect($redirectUrl);
382 } 388 }
383 389
390
391
384 /** 392 /**
385 * Changes starred status for an entry. 393 * Changes starred status for an entry.
386 * 394 *
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 527b1afc..899a8a7f 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
@@ -67,9 +67,9 @@
67 {% endif %} 67 {% endif %}
68 68
69 <li class="bold hide-on-med-and-down"> 69 <li class="bold hide-on-med-and-down">
70 <a class="waves-effect collapsible-header markasread" title="{{ markAsReadLabel|trans }}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> 70 <a class="waves-effect collapsible-header markasread" title="{{ markAsReadLabel|trans }}" href="#" data-icon-read="done" data-icon-unread="unarchive" data-label-read="{{ 'entry.view.left_menu.set_as_read'|trans }}" data-label-unread="{{ 'entry.view.left_menu.set_as_unread'|trans }}" id="link-archive">
71 <i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i> 71 <i class="material-icons small" id="archive-icon">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i>
72 <span>{{ markAsReadLabel|trans }}</span> 72 <span id="archive-label">{{ markAsReadLabel|trans }}</span>
73 </a> 73 </a>
74 <div class="collapsible-body"></div> 74 <div class="collapsible-body"></div>
75 </li> 75 </li>
@@ -221,7 +221,7 @@
221{% endblock %} 221{% endblock %}
222 222
223{% block content %} 223{% block content %}
224 <div id="article"> 224 <div id="article" data-id="{{ entry.id }}">
225 <header class="mbm"> 225 <header class="mbm">
226 <h1><span{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>{{ entry.title|striptags|default('entry.default_title'|trans)|raw }}</span> <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}"><i class="material-icons grey-text">create</i></a></h1> 226 <h1><span{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>{{ entry.title|striptags|default('entry.default_title'|trans)|raw }}</span> <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}"><i class="material-icons grey-text">create</i></a></h1>
227 </header> 227 </header>
@@ -291,7 +291,6 @@
291 </ul> 291 </ul>
292 </div> 292 </div>
293 </div> 293 </div>
294
295<script id="annotationroutes" type="application/json"> 294<script id="annotationroutes" type="application/json">
296{ 295{
297 "prefix": "", 296 "prefix": "",