aboutsummaryrefslogtreecommitdiff
path: root/app/views
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
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')
-rw-r--r--app/views/configure/categorize.phtml2
-rw-r--r--app/views/configure/display.phtml10
-rw-r--r--app/views/configure/feed.phtml10
-rw-r--r--app/views/helpers/view/global_view.phtml2
-rw-r--r--app/views/helpers/view/normal_view.phtml16
5 files changed, 20 insertions, 20 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index 01b5c96bc..cbb5e9e81 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -22,7 +22,7 @@
(<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
<?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
- <i class="icon i_help">ⓘ</i> <?php echo Translate::t ('can_not_be_deleted'); ?>
+ <?php echo icon('help'); ?> <?php echo Translate::t ('can_not_be_deleted'); ?>
<?php } ?>
<input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 38f2ee1d5..4e01be6ef 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -56,7 +56,7 @@
<?php $token = $this->conf->token (); ?>
<div class="group-controls">
<input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>"/>
- <i class="icon i_help">ⓘ</i> <?php echo Translate::t('explain_token', Url::display(null, 'html', true), $token); ?>
+ <?php echo icon('help'); ?> <?php echo Translate::t('explain_token', Url::display(null, 'html', true), $token); ?>
</div>
</div>
@@ -162,12 +162,12 @@
<thead>
<tr>
<th> </th>
- <th><a class="icon read" title="<?php echo Translate::t ('mark_read'); ?>">☑</a></th>
- <th><a class="icon bookmark" title="<?php echo Translate::t ('mark_favorite'); ?>">★</a></th>
+ <th title="<?php echo Translate::t ('mark_read'); ?>"><?php echo icon('read'); ?></th>
+ <th title="<?php echo Translate::t ('mark_favorite'); ?>"><?php echo icon('bookmark'); ?></th>
<th><?php echo Translate::t ('sharing'); ?></th>
<th><?php echo Translate::t ('related_tags'); ?></th>
<th><?php echo Translate::t ('publication_date'); ?></th>
- <th class="link"><a class="icon">↗</a></th>
+ <th><?php echo icon('link'); ?></th>
</tr>
</thead>
<tbody>
@@ -208,7 +208,7 @@
<p><a class="btn" href="<?php echo _url('entry', 'optimize'); ?>">
<?php echo Translate::t('optimize_bdd'); ?>
</a></p>
- <i class="icon i_help">ⓘ</i> <?php echo Translate::t('optimize_todo_sometimes'); ?>
+ <?php echo icon('help'); ?> <?php echo Translate::t('optimize_todo_sometimes'); ?>
</div>
</div>
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index 3656dc0a3..8fecec36f 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -29,21 +29,21 @@
<label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
<div class="group-controls">
<input type="text" name="website" id="website" value="<?php echo $this->flux->website (); ?>" />
- <a target="_blank" href="<?php echo $this->flux->website (); ?>"><i class="icon i_link">↗</i></a>
+ <a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo icon('link'); ?></a>
</div>
</div>
<div class="form-group">
<label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
<div class="group-controls">
<input type="text" name="url" id="url" value="<?php echo $this->flux->url (); ?>" />
- <a target="_blank" href="<?php echo $this->flux->url (); ?>"><i class="icon i_link">↗</i></a>
+ <a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo icon('link'); ?></a>
</div>
</div>
<div class="form-group">
<label class="group-name"></label>
<div class="group-controls">
<a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
- <i class="icon i_refresh">↻</i> <?php echo Translate::t('actualize'); ?>
+ <?php echo icon('refresh'); ?> <?php echo Translate::t('actualize'); ?>
</a>
</div>
</div>
@@ -85,7 +85,7 @@
<label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
<div class="group-controls">
<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
- <i class="icon i_help">ⓘ</i> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
+ <?php echo icon('help'); ?> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
</div>
</div>
@@ -94,7 +94,7 @@
<label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
<div class="group-controls">
<input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
- <i class="icon i_help">ⓘ</i> <?php echo Translate::t ('access_protected_feeds'); ?>
+ <?php echo icon('help'); ?> <?php echo Translate::t ('access_protected_feeds'); ?>
</div>
<label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml
index e555adb9f..f34d368f9 100644
--- a/app/views/helpers/view/global_view.phtml
+++ b/app/views/helpers/view/global_view.phtml
@@ -32,5 +32,5 @@
<div id="overlay"></div>
<div id="panel"<?php echo $this->conf->displayPosts () === 'no' ? ' class="hide_posts"' : ''; ?>>
- <a class="close" href="#"><i class="icon i_close">❌</i></a>
+ <a class="close" href="#"><?php echo icon('close'); ?></a>
</div> \ No newline at end of file
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>