diff options
Diffstat (limited to 'src')
5 files changed, 11 insertions, 12 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 52707cb8..8a093289 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -143,7 +143,7 @@ class TagController extends Controller | |||
143 | 'form' => null, | 143 | 'form' => null, |
144 | 'entries' => $entries, | 144 | 'entries' => $entries, |
145 | 'currentPage' => $page, | 145 | 'currentPage' => $page, |
146 | 'tag' => $tag->getLabel(), | 146 | 'tag' => $tag->getSlug(), |
147 | ]); | 147 | ]); |
148 | } | 148 | } |
149 | } | 149 | } |
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php index 09e99f36..6de561e0 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php | |||
@@ -15,7 +15,7 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface | |||
15 | public function load(ObjectManager $manager) | 15 | public function load(ObjectManager $manager) |
16 | { | 16 | { |
17 | $tag1 = new Tag(); | 17 | $tag1 = new Tag(); |
18 | $tag1->setLabel('foo'); | 18 | $tag1->setLabel('foo bar'); |
19 | 19 | ||
20 | $manager->persist($tag1); | 20 | $manager->persist($tag1); |
21 | 21 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig index 56442116..d278da1b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_actions.html.twig | |||
@@ -1,8 +1,6 @@ | |||
1 | <div class="card-action"> | 1 | <div class="card-action"> |
2 | <span class="reading-time grey-text"> | 2 | <span class="reading-time grey-text"> |
3 | <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i> | 3 | {% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %} |
4 | {{ entry.readingTime / app.user.config.readingSpeed|round }} min | ||
5 | |||
6 | <i class="material-icons hide-on-med-and-down" title="{{ 'entry.view.created_at'|trans }}">today</i> | 4 | <i class="material-icons hide-on-med-and-down" title="{{ 'entry.view.created_at'|trans }}">today</i> |
7 | <span class="hide-on-med-and-down"> {{ entry.createdAt|date('Y-m-d') }}</span> | 5 | <span class="hide-on-med-and-down"> {{ entry.createdAt|date('Y-m-d') }}</span> |
8 | </span> | 6 | </span> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig new file mode 100644 index 00000000..1a932a9f --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_reading_time.html.twig | |||
@@ -0,0 +1,7 @@ | |||
1 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | ||
2 | <i class="material-icons">timer</i> | ||
3 | {% if readingTime > 0 %} | ||
4 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} | ||
5 | {% else %} | ||
6 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} | ||
7 | {% 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 0cbf1999..46f89e19 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 | |||
@@ -214,13 +214,7 @@ | |||
214 | <aside> | 214 | <aside> |
215 | <ul class="tools"> | 215 | <ul class="tools"> |
216 | <li> | 216 | <li> |
217 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 217 | {% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %} |
218 | <i class="material-icons">timer</i> | ||
219 | {% if readingTime > 0 %} | ||
220 | {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} | ||
221 | {% else %} | ||
222 | {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} | ||
223 | {% endif %} | ||
224 | </li> | 218 | </li> |
225 | <li> | 219 | <li> |
226 | <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> | 220 | <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> |