}
if (!is_null($isArchived)) {
- $entry->setRead($isArchived);
+ $entry->setArchived($isArchived);
}
if (!is_null($isDeleted)) {
}
if (!is_null($isStarred)) {
- $entry->setFav($isStarred);
+ $entry->setStarred($isStarred);
}
$em = $this->getDoctrine()->getManager();
/**
* @var boolean
*
- * @ORM\Column(name="is_read", type="boolean", nullable=true, options={"default" = false})
+ * @ORM\Column(name="is_archived", type="boolean", nullable=true, options={"default" = false})
*/
- private $isRead = false;
+ private $isArchived = false;
/**
* @var boolean
*
- * @ORM\Column(name="is_fav", type="boolean", nullable=true, options={"default" = false})
+ * @ORM\Column(name="is_starred", type="boolean", nullable=true, options={"default" = false})
*/
- private $isFav = false;
+ private $isStarred = false;
/**
* @var boolean
}
/**
- * Set isRead
+ * Set isArchived
*
- * @param string $isRead
+ * @param string $isArchived
* @return Entries
*/
- public function setRead($isRead)
+ public function setArchived($isArchived)
{
- $this->isRead = $isRead;
+ $this->isArchived = $isArchived;
return $this;
}
/**
- * Get isRead
+ * Get isArchived
*
* @return string
*/
- public function isRead()
+ public function isArchived()
{
- return $this->isRead;
+ return $this->isArchived;
}
public function toggleArchive()
{
- $this->isRead = $this->getIsRead() ^ 1;
+ $this->isArchived = $this->isArchived() ^ 1;
return $this;
}
/**
- * Set isFav
+ * Set isStarred
*
- * @param string $isFav
+ * @param string $isStarred
* @return Entries
*/
- public function setFav($isFav)
+ public function setStarred($isStarred)
{
- $this->isFav = $isFav;
+ $this->isStarred = $isStarred;
return $this;
}
/**
- * Get isFav
+ * Get isStarred
*
* @return string
*/
- public function isFav()
+ public function isStarred()
{
- return $this->isFav;
+ return $this->isStarred;
}
public function toggleStar()
{
- $this->isFav = $this->getIsFav() ^ 1;
+ $this->isStarred = $this->isStarred() ^ 1;
return $this;
}
->select('e')
->setFirstResult($firstResult)
->setMaxResults($maxResults)
- ->where('e.isRead = 0')
+ ->where('e.isArchived = false')
->andWhere('e.userId =:userId')->setParameter('userId', $userId)
- ->andWhere('e.isDeleted=0')
+ ->andWhere('e.isDeleted=false')
->orderBy('e.createdAt', 'desc')
->getQuery();
->select('e')
->setFirstResult($firstResult)
->setMaxResults($maxResults)
- ->where('e.isRead = 1')
+ ->where('e.isArchived = true')
->andWhere('e.userId =:userId')->setParameter('userId', $userId)
- ->andWhere('e.isDeleted=0')
+ ->andWhere('e.isDeleted=false')
->orderBy('e.createdAt', 'desc')
->getQuery();
->select('e')
->setFirstResult($firstResult)
->setMaxResults($maxResults)
- ->where('e.isFav = 1')
+ ->where('e.isStarred = true')
->andWhere('e.userId =:userId')->setParameter('userId', $userId)
- ->andWhere('e.isDeleted=0')
+ ->andWhere('e.isDeleted=false')
->orderBy('e.createdAt', 'desc')
->getQuery();
->where('e.userId =:userId')->setParameter('userId', $userId);
if (!is_null($isArchived)) {
- $qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived);
+ $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', $isArchived);
}
if (!is_null($isStarred)) {
- $qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred);
+ $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', $isStarred);
}
if (!is_null($isDeleted)) {
{% endif %}
<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 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 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.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 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 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><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 %}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 %}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.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>
{% 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 }}&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 %}