Merge pull request #1059 from wallabag/rename-entry

Rename entry
This commit is contained in:
Jeremy 2015-02-06 09:55:16 +01:00
commit 29c4517f7a
7 changed files with 88 additions and 91 deletions

View file

@ -5,8 +5,8 @@ namespace Wallabag\CoreBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Repository; use Wallabag\CoreBundle\Repository;
use Wallabag\CoreBundle\Entity\Entries;
use Wallabag\CoreBundle\Service\Extractor; use Wallabag\CoreBundle\Service\Extractor;
use Wallabag\CoreBundle\Helper\Url; use Wallabag\CoreBundle\Helper\Url;
@ -19,7 +19,7 @@ class EntryController extends Controller
*/ */
public function addEntryAction(Request $request) public function addEntryAction(Request $request)
{ {
$entry = new Entries(); $entry = new Entry();
$entry->setUserId(1); $entry->setUserId(1);
$form = $this->createFormBuilder($entry) $form = $this->createFormBuilder($entry)
@ -60,7 +60,7 @@ class EntryController extends Controller
*/ */
public function showUnreadAction() public function showUnreadAction()
{ {
$repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
// TODO don't give the user ID like this // TODO don't give the user ID like this
// TODO change pagination // TODO change pagination
$entries = $repository->findUnreadByUser(1, 0); $entries = $repository->findUnreadByUser(1, 0);
@ -79,7 +79,7 @@ class EntryController extends Controller
*/ */
public function showArchiveAction() public function showArchiveAction()
{ {
$repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
// TODO don't give the user ID like this // TODO don't give the user ID like this
// TODO change pagination // TODO change pagination
$entries = $repository->findArchiveByUser(1, 0); $entries = $repository->findArchiveByUser(1, 0);
@ -98,7 +98,7 @@ class EntryController extends Controller
*/ */
public function showStarredAction() public function showStarredAction()
{ {
$repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entries'); $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
// TODO don't give the user ID like this // TODO don't give the user ID like this
// TODO change pagination // TODO change pagination
$entries = $repository->findStarredByUser(1, 0); $entries = $repository->findStarredByUser(1, 0);
@ -112,11 +112,11 @@ class EntryController extends Controller
/** /**
* Shows entry content * Shows entry content
* *
* @param Entries $entry * @param Entry $entry
* @Route("/view/{id}", requirements={"id" = "\d+"}, name="view") * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
*/ */
public function viewAction(Entries $entry) public function viewAction(Entry $entry)
{ {
return $this->render( return $this->render(
'WallabagCoreBundle:Entry:entry.html.twig', 'WallabagCoreBundle:Entry:entry.html.twig',
@ -128,11 +128,11 @@ class EntryController extends Controller
* Changes read status for an entry * Changes read status for an entry
* *
* @param Request $request * @param Request $request
* @param Entries $entry * @param Entry $entry
* @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry") * @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry")
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
*/ */
public function toggleArchiveAction(Request $request, Entries $entry) public function toggleArchiveAction(Request $request, Entry $entry)
{ {
$entry->toggleArchive(); $entry->toggleArchive();
$this->getDoctrine()->getManager()->flush(); $this->getDoctrine()->getManager()->flush();
@ -149,11 +149,11 @@ class EntryController extends Controller
* Changes favorite status for an entry * Changes favorite status for an entry
* *
* @param Request $request * @param Request $request
* @param Entries $entry * @param Entry $entry
* @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry") * @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry")
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
*/ */
public function toggleStarAction(Request $request, Entries $entry) public function toggleStarAction(Request $request, Entry $entry)
{ {
$entry->toggleStar(); $entry->toggleStar();
$this->getDoctrine()->getManager()->flush(); $this->getDoctrine()->getManager()->flush();
@ -170,11 +170,11 @@ class EntryController extends Controller
* Deletes entry * Deletes entry
* *
* @param Request $request * @param Request $request
* @param Entries $entry * @param Entry $entry
* @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry") * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
*/ */
public function deleteEntryAction(Request $request, Entries $entry) public function deleteEntryAction(Request $request, Entry $entry)
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$entry->setDeleted(1); $entry->setDeleted(1);

View file

@ -6,7 +6,7 @@ use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\CoreBundle\Entity\Entries; use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tags; use Wallabag\CoreBundle\Entity\Tags;
use Wallabag\CoreBundle\Service\Extractor; use Wallabag\CoreBundle\Service\Extractor;
@ -27,7 +27,7 @@ class WallabagRestController extends Controller
* {"name"="tags", "dataType"="string", "required"=false, "format"="api%2Crest", "description"="a list of tags url encoded. Will returns entries that matches ALL tags."}, * {"name"="tags", "dataType"="string", "required"=false, "format"="api%2Crest", "description"="a list of tags url encoded. Will returns entries that matches ALL tags."},
* } * }
* ) * )
* @return Entries * @return Entry
*/ */
public function getEntriesAction(Request $request) public function getEntriesAction(Request $request)
{ {
@ -42,7 +42,7 @@ class WallabagRestController extends Controller
$entries = $this $entries = $this
->getDoctrine() ->getDoctrine()
->getRepository('WallabagCoreBundle:Entries') ->getRepository('WallabagCoreBundle:Entry')
->findEntries(1, $isArchived, $isStarred, $isDeleted, $sort, $order); ->findEntries(1, $isArchived, $isStarred, $isDeleted, $sort, $order);
if (!is_array($entries)) { if (!is_array($entries)) {
@ -60,9 +60,9 @@ class WallabagRestController extends Controller
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
* } * }
* ) * )
* @return Entries * @return Entry
*/ */
public function getEntryAction(Entries $entry) public function getEntryAction(Entry $entry)
{ {
return $entry; return $entry;
} }
@ -77,6 +77,7 @@ class WallabagRestController extends Controller
* {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."}, * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."},
* } * }
* ) * )
* @return Entry
*/ */
public function postEntriesAction(Request $request) public function postEntriesAction(Request $request)
{ {
@ -84,7 +85,7 @@ class WallabagRestController extends Controller
$url = $request->request->get('url'); $url = $request->request->get('url');
$content = Extractor::extract($url); $content = Extractor::extract($url);
$entry = new Entries(); $entry = new Entry();
$entry->setUserId(1); $entry->setUserId(1);
$entry->setUrl($url); $entry->setUrl($url);
$entry->setTitle($request->request->get('title') ?: $content->getTitle()); $entry->setTitle($request->request->get('title') ?: $content->getTitle());
@ -111,8 +112,9 @@ class WallabagRestController extends Controller
* {"name"="delete", "dataType"="boolean", "required"=false, "format"="true or false", "description"="flag as deleted. Default false. In case that you don't want to *really* remove it.."}, * {"name"="delete", "dataType"="boolean", "required"=false, "format"="true or false", "description"="flag as deleted. Default false. In case that you don't want to *really* remove it.."},
* } * }
* ) * )
* @return Entry
*/ */
public function patchEntriesAction(Entries $entry, Request $request) public function patchEntriesAction(Entry $entry, Request $request)
{ {
$title = $request->request->get("title"); $title = $request->request->get("title");
$tags = $request->request->get("tags", array()); $tags = $request->request->get("tags", array());
@ -125,7 +127,7 @@ class WallabagRestController extends Controller
} }
if (!is_null($isArchived)) { if (!is_null($isArchived)) {
$entry->setRead($isArchived); $entry->setArchived($isArchived);
} }
if (!is_null($isDeleted)) { if (!is_null($isDeleted)) {
@ -133,7 +135,7 @@ class WallabagRestController extends Controller
} }
if (!is_null($isStarred)) { if (!is_null($isStarred)) {
$entry->setFav($isStarred); $entry->setStarred($isStarred);
} }
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
@ -150,8 +152,9 @@ class WallabagRestController extends Controller
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
* } * }
* ) * )
* @return Entry
*/ */
public function deleteEntriesAction(Entries $entry) public function deleteEntriesAction(Entry $entry)
{ {
if ($entry->isDeleted()) { if ($entry->isDeleted()) {
throw new NotFoundHttpException('This entry is already deleted'); throw new NotFoundHttpException('This entry is already deleted');
@ -173,7 +176,7 @@ class WallabagRestController extends Controller
* } * }
* ) * )
*/ */
public function getEntriesTagsAction(Entries $entry) public function getEntriesTagsAction(Entry $entry)
{ {
} }
@ -189,7 +192,7 @@ class WallabagRestController extends Controller
* } * }
* ) * )
*/ */
public function postEntriesTagsAction(Entries $entry) public function postEntriesTagsAction(Entry $entry)
{ {
} }
@ -203,7 +206,7 @@ class WallabagRestController extends Controller
* } * }
* ) * )
*/ */
public function deleteEntriesTagsAction(Entries $entry, Tags $tag) public function deleteEntriesTagsAction(Entry $entry, Tags $tag)
{ {
} }

View file

@ -6,23 +6,23 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
/** /**
* Entries * Entry
* *
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntriesRepository") * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository")
* @ORM\Table(name="entries") * @ORM\Table(name="entry")
* @ORM\HasLifecycleCallbacks() * @ORM\HasLifecycleCallbacks()
* *
*/ */
class Entries class Entry
{ {
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="id", type="integer", nullable=true) * @ORM\Column(name="id", type="integer")
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO") * @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id = null; private $id;
/** /**
* @var string * @var string
@ -42,21 +42,21 @@ class Entries
/** /**
* @var boolean * @var boolean
* *
* @ORM\Column(name="is_read", type="boolean", nullable=true, options={"default" = false}) * @ORM\Column(name="is_archived", type="boolean")
*/ */
private $isRead = false; private $isArchived = false;
/** /**
* @var boolean * @var boolean
* *
* @ORM\Column(name="is_fav", type="boolean", nullable=true, options={"default" = false}) * @ORM\Column(name="is_starred", type="boolean")
*/ */
private $isFav = false; private $isStarred = false;
/** /**
* @var boolean * @var boolean
* *
* @ORM\Column(name="is_deleted", type="boolean", nullable=true, options={"default" = false}) * @ORM\Column(name="is_deleted", type="boolean")
*/ */
private $isDeleted = false; private $isDeleted = false;
@ -70,14 +70,14 @@ class Entries
/** /**
* @var date * @var date
* *
* @ORM\Column(name="created_at", type="datetime", nullable=true) * @ORM\Column(name="created_at", type="datetime")
*/ */
private $createdAt; private $createdAt;
/** /**
* @var date * @var date
* *
* @ORM\Column(name="updated_at", type="datetime", nullable=true) * @ORM\Column(name="updated_at", type="datetime")
*/ */
private $updatedAt; private $updatedAt;
@ -137,7 +137,7 @@ class Entries
* Set title * Set title
* *
* @param string $title * @param string $title
* @return Entries * @return Entry
*/ */
public function setTitle($title) public function setTitle($title)
{ {
@ -160,7 +160,7 @@ class Entries
* Set url * Set url
* *
* @param string $url * @param string $url
* @return Entries * @return Entry
*/ */
public function setUrl($url) public function setUrl($url)
{ {
@ -180,61 +180,61 @@ class Entries
} }
/** /**
* Set isRead * Set isArchived
* *
* @param string $isRead * @param string $isArchived
* @return Entries * @return Entry
*/ */
public function setRead($isRead) public function setArchived($isArchived)
{ {
$this->isRead = $isRead; $this->isArchived = $isArchived;
return $this; return $this;
} }
/** /**
* Get isRead * Get isArchived
* *
* @return string * @return string
*/ */
public function isRead() public function isArchived()
{ {
return $this->isRead; return $this->isArchived;
} }
public function toggleArchive() public function toggleArchive()
{ {
$this->isRead = $this->getIsRead() ^ 1; $this->isArchived = $this->isArchived() ^ 1;
return $this; return $this;
} }
/** /**
* Set isFav * Set isStarred
* *
* @param string $isFav * @param string $isStarred
* @return Entries * @return Entry
*/ */
public function setFav($isFav) public function setStarred($isStarred)
{ {
$this->isFav = $isFav; $this->isStarred = $isStarred;
return $this; return $this;
} }
/** /**
* Get isFav * Get isStarred
* *
* @return string * @return string
*/ */
public function isFav() public function isStarred()
{ {
return $this->isFav; return $this->isStarred;
} }
public function toggleStar() public function toggleStar()
{ {
$this->isFav = $this->getIsFav() ^ 1; $this->isStarred = $this->isStarred() ^ 1;
return $this; return $this;
} }
@ -243,7 +243,7 @@ class Entries
* Set content * Set content
* *
* @param string $content * @param string $content
* @return Entries * @return Entry
*/ */
public function setContent($content) public function setContent($content)
{ {
@ -266,7 +266,7 @@ class Entries
* Set userId * Set userId
* *
* @param string $userId * @param string $userId
* @return Entries * @return Entry
*/ */
public function setUserId($userId) public function setUserId($userId)
{ {
@ -309,15 +309,6 @@ class Entries
return $this->createdAt; return $this->createdAt;
} }
/**
* @param mixed $createdAt
* @ORM\PrePersist
*/
public function setCreatedAt()
{
$this->createdAt = new \DateTime();
}
/** /**
* @return string * @return string
*/ */
@ -327,11 +318,15 @@ class Entries
} }
/** /**
* @param string $updatedAt * @ORM\PrePersist
* @ORM\PreUpdate * @ORM\PreUpdate
*/ */
public function setUpdatedAt() public function timestamps()
{ {
if (is_null($this->createdAt)) {
$this->createdAt = new \DateTime();
}
$this->updatedAt = new \DateTime(); $this->updatedAt = new \DateTime();
} }

View file

@ -2,6 +2,6 @@
namespace Wallabag\CoreBundle\Helper; namespace Wallabag\CoreBundle\Helper;
class Entries class Entry
{ {
} }

View file

@ -5,9 +5,8 @@ namespace Wallabag\CoreBundle\Repository;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator; use Doctrine\ORM\Tools\Pagination\Paginator;
use Wallabag\CoreBundle\Entity\Entries;
class EntriesRepository extends EntityRepository class EntryRepository extends EntityRepository
{ {
/** /**
* Retrieves unread entries for a user * Retrieves unread entries for a user
@ -23,9 +22,9 @@ class EntriesRepository extends EntityRepository
->select('e') ->select('e')
->setFirstResult($firstResult) ->setFirstResult($firstResult)
->setMaxResults($maxResults) ->setMaxResults($maxResults)
->where('e.isRead = 0') ->where('e.isArchived = false')
->andWhere('e.userId =:userId')->setParameter('userId', $userId) ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
->andWhere('e.isDeleted=0') ->andWhere('e.isDeleted=false')
->orderBy('e.createdAt', 'desc') ->orderBy('e.createdAt', 'desc')
->getQuery(); ->getQuery();
@ -48,9 +47,9 @@ class EntriesRepository extends EntityRepository
->select('e') ->select('e')
->setFirstResult($firstResult) ->setFirstResult($firstResult)
->setMaxResults($maxResults) ->setMaxResults($maxResults)
->where('e.isRead = 1') ->where('e.isArchived = true')
->andWhere('e.userId =:userId')->setParameter('userId', $userId) ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
->andWhere('e.isDeleted=0') ->andWhere('e.isDeleted=false')
->orderBy('e.createdAt', 'desc') ->orderBy('e.createdAt', 'desc')
->getQuery(); ->getQuery();
@ -73,9 +72,9 @@ class EntriesRepository extends EntityRepository
->select('e') ->select('e')
->setFirstResult($firstResult) ->setFirstResult($firstResult)
->setMaxResults($maxResults) ->setMaxResults($maxResults)
->where('e.isFav = 1') ->where('e.isStarred = true')
->andWhere('e.userId =:userId')->setParameter('userId', $userId) ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
->andWhere('e.isDeleted=0') ->andWhere('e.isDeleted=false')
->orderBy('e.createdAt', 'desc') ->orderBy('e.createdAt', 'desc')
->getQuery(); ->getQuery();
@ -91,11 +90,11 @@ class EntriesRepository extends EntityRepository
->where('e.userId =:userId')->setParameter('userId', $userId); ->where('e.userId =:userId')->setParameter('userId', $userId);
if (!is_null($isArchived)) { if (!is_null($isArchived)) {
$qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived); $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', $isArchived);
} }
if (!is_null($isStarred)) { if (!is_null($isStarred)) {
$qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred); $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', $isStarred);
} }
if (!is_null($isDeleted)) { if (!is_null($isDeleted)) {

View file

@ -35,8 +35,8 @@
{% endif %} {% endif %}
<ul class="tools links"> <ul class="tools links">
<li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> <li><a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li>
<li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li> <li><a title="{% trans %}toggle favorite{% endtrans %}" class="tool icon-star icon {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}toggle favorite{% endtrans %}</span></a></li>
<li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li> <li><a title="{% trans %}delete{% endtrans %}" class="tool delete icon-trash icon" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}delete{% endtrans %}</span></a></li>
<li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.url | e | domainName }}</span></a></li> <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.url | e | domainName }}</span></a></li>
</ul> </ul>

View file

@ -11,8 +11,8 @@
<ul class="links"> <ul class="links">
<li class="topPosF"><a href="#top" title="{% trans %}Back to top{% endtrans %}" class="tool top icon icon-arrow-up-thick"><span>{% trans %}Back to top{% endtrans %}</span></a></li> <li class="topPosF"><a href="#top" title="{% trans %}Back to top{% endtrans %}" class="tool top icon icon-arrow-up-thick"><span>{% trans %}Back to top{% endtrans %}</span></a></li>
<li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | domainName }}</span></a></li> <li><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link icon icon-link"><span>{{ entry.url | e | domainName }}</span></a></li>
<li><a title="{% trans %}Mark as read{% endtrans %}" class="tool icon icon-check {% if entry.isRead == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li> <li><a title="{% trans %}Mark as read{% endtrans %}" class="tool icon icon-check {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle mark as read{% endtrans %}</span></a></li>
<li><a title="{% trans %}Favorite{% endtrans %}" class="tool icon icon-star {% if entry.isFav == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle favorite{% endtrans %}</span></a></li> <li><a title="{% trans %}Favorite{% endtrans %}" class="tool icon icon-star {% if entry.isStarred == 0 %}fav-off{% else %}fav{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"><span>{% trans %}Toggle favorite{% endtrans %}</span></a></li>
<li><a title="{% trans %}Delete{% endtrans %}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}Delete{% endtrans %}</span></a></li> <li><a title="{% trans %}Delete{% endtrans %}" class="tool delete icon icon-trash" href="{{ path('delete_entry', { 'id': entry.id }) }}"><span>{% trans %}Delete{% endtrans %}</span></a></li>
{% if share_twitter %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans %}Tweet{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %} {% if share_twitter %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans %}Tweet{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %}
{% if share_mail %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %} {% if share_mail %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %}