summaryrefslogtreecommitdiff
path: root/app/views/helpers/view/normal_view.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-23 23:18:18 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-23 23:18:18 +0100
commit29137c0b046bfcc610e6c8a152e558fa9c718da4 (patch)
tree3e4a6709919ce98ebb8f360e1f5a4240c5956cdb /app/views/helpers/view/normal_view.phtml
parent6236f2a803185c06331ddd3e5cbdb4499629e1ef (diff)
Nouvelle fonction icon() pour générer le code HTML des icônes
Centralisation de la génération du code des icônes pour pouvoir plus facilement le changer, en particulier en préparation d'améliorations futures : * ajouter des alternatives lorsque l'image n'est pas affichée ; * améliorer l'accessibilité ; * permettre de changer les icônes selon le thème graphique choisi ; * simplifier les CSS. Contribue à https://github.com/marienfressinaud/FreshRSS/issues/284
Diffstat (limited to 'app/views/helpers/view/normal_view.phtml')
-rw-r--r--app/views/helpers/view/normal_view.phtml16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index fccfd71b4..6a023451f 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -42,13 +42,13 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
if ($this->conf->toplineRead ()) {
?><li class="item manage"><?php
?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
- echo $item->isRead () ? '☑' : '☐'; ?></a><?php
+ echo icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
?></li><?php
}
if ($this->conf->toplineFavorite ()) {
?><li class="item manage"><?php
?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
- echo $item->isFavorite () ? '★' : '☆'; ?></a><?php
+ echo icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
?></li><?php
}
}
@@ -58,7 +58,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
<li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li>
<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
<?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
- <?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a class="icon" target="_blank" href="<?php echo $item->link (); ?>">↗</a></li><?php } ?>
+ <?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo icon('link'); ?></a></li><?php } ?>
</ul>
<div class="flux_content">
@@ -79,13 +79,13 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
if ($this->conf->bottomlineRead ()) {
?><li class="item manage"><?php
?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
- echo $item->isRead () ? '☑' : '☐'; ?></a><?php
+ echo icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
?></li><?php
}
if ($this->conf->bottomlineFavorite ()) {
?><li class="item manage"><?php
?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
- echo $item->isFavorite () ? '★' : '☆'; ?></a><?php
+ echo icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
?></li><?php
}
} ?>
@@ -97,7 +97,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
?>
<div class="dropdown">
<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
- <i class="icon i_share">♺</i> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>
+ <?php echo icon('share'); ?> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
@@ -141,7 +141,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
<li class="item">
<div class="dropdown">
<div id="dropdown-tags-<?php echo $item->id ();?>" class="dropdown-target"></div>
- <i class="icon i_tag">⚐</i> <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php echo Translate::t ('related_tags'); ?></a>
+ <?php echo icon('tag'); ?> <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php echo Translate::t ('related_tags'); ?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
<?php foreach($tags as $tag) { ?>
@@ -152,7 +152,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
</li>
<?php } ?>
<?php if ($this->conf->bottomlineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
- <?php if ($this->conf->bottomlineLink ()) { ?><li class="item link"><a class="icon" target="_blank" href="<?php echo $item->link (); ?>">↗</a></li><?php } ?>
+ <?php if ($this->conf->bottomlineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo icon('link'); ?></a></li><?php } ?>
</ul>
</div>
</div>