const scrollPercent = (s / (d - c)) * 100;
$('.progress .determinate').css('width', `${scrollPercent}%`);
});
+
+ $('.notification').on('click', () => {
+ $.ajax({
+ url: Routing.generate('notification-archive-all'),
+ method: 'GET',
+ }).done(() => {
+ $('#notifications').sideNav('hide');
+ });
+ });
});
'notifications' => $notifications,
'currentPage' => $page,
]);
+
}
/**
/**
* Class Notification.
+ * Class Notification
*
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\NotificationRepository")
* @ORM\Table(name="`notification`")
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
+ *
*/
protected $id;
/**
- * @var int
+ * @var int $type
*
* @ORM\Column(name="type", type="integer")
*/
protected $type;
/**
- * @var User
+ * @var User $user
*
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="notifications")
*/
protected $user;
/**
- * @var \DateTime
*
* @ORM\Column(name="timestamp", type="datetime")
*/
protected $timestamp;
/**
- * @var string
+ * @var string $title
*
* @ORM\Column(name="title", type="string")
*/
protected $description;
/**
- * @var bool
+ * @var boolean $read
*
* @ORM\Column(name="read", type="boolean")
*/
* @param ActionInterface $action
*
* @return NotificationInterface
- *
* @throws \InvalidArgumentException
*/
public function addAction(ActionInterface $action)
}
$this->actionTypes[$action->getType()] = true;
$this->actions->add($action);
-
return $this;
}
* @param int $type
*
* @return ActionInterface
- *
* @throws \InvalidArgumentException
*/
public function setType($type)
interface ActionInterface
{
+
/**
* @return string
*/
/**
* If the notification has been viewed / dismissed or not.
*
- * @return bool
+ * @return boolean
*/
public function isRead();
/**
- * @param bool $read
+ * @param boolean $read
*
* @return NotificationInterface
*/
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'Om'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'Über'
top_menu:
release:
title: "wallabag has been updated to version %version%"
details: "View update's details"
+
about:
page_title: 'About'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'Acerca de'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'درباره'
top_menu:
title: "wallabag a été mis à jour vers la version %version%"
details: "Voir les détails de la mise à jour"
+notifications:
+ sidebar:
+ view_more: 'Voir plus'
+ list:
+ page_title: 'Notifications'
+ mark_all_as_read: 'Marquer tout comme lu'
+
about:
page_title: "À propos"
top_menu:
# release:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+
about:
page_title: 'A proposito'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'A prepaus'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'O nas'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'Sobre'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'Despre'
top_menu:
# title: "wallabag has been updated to version %version%"
# details: "View update's details"
+# notifications:
+# sidebar:
+# view_more: 'View more'
+# list:
+# page_title: 'Notifications'
+# mark_all_as_read: 'Mark all as read'
+
about:
page_title: 'Hakkımızda'
top_menu:
namespace Wallabag\CoreBundle\Twig;
+use Doctrine\Common\Collections\Collection;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Wallabag\CoreBundle\Notifications\NotificationInterface;
use Wallabag\CoreBundle\Repository\EntryRepository;