diff options
| author | 2013-11-24 20:42:55 +0100 | |
|---|---|---|
| committer | 2013-11-24 20:42:55 +0100 | |
| commit | d85e6c5b83a45ac2084ac5bca75e6b8a069e07a0 (patch) | |
| tree | b4ce91263d8529abf1973c829fa814e6d3587783 /app/models/RSSThemes.php | |
| parent | 20acba36a20a61619978f8f75d236eee2676fd30 (diff) | |
Refactorise icon() dans RSSThemes::icon
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/284
Diffstat (limited to 'app/models/RSSThemes.php')
| -rw-r--r-- | app/models/RSSThemes.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/app/models/RSSThemes.php b/app/models/RSSThemes.php index 83db85acf..54420048b 100644 --- a/app/models/RSSThemes.php +++ b/app/models/RSSThemes.php @@ -44,4 +44,36 @@ class RSSThemes extends Model { return false; } -}
\ No newline at end of file + + public static function icon($name) { + static $alts = array( + 'add' => '✚', + 'all' => '☰', + 'bookmark' => '★', + 'category' => '☷', + 'category-white' => '☷', + 'close' => '❌', + 'configure' => '⚙', + 'down' => '▽', + 'favorite' => '★', + 'help' => 'ⓘ', + 'link' => '↗', + 'login' => '🔒', + 'logout' => '🔓', + 'next' => '⏩', + 'non-starred' => '☆', + 'prev' => '⏪', + 'read' => '☑', + 'unread' => '☐', + 'refresh' => '🔃', //↻ + 'search' => '🔍', + 'share' => '♺', + 'starred' => '★', + 'tag' => '⚐', + 'up' => '△', + ); + $alt = isset($alts[$name]) ? $alts[$name] : '?'; + return '<i class="icon i_' . $name . '">' . $alts[$name] . '</i>'; + //return '<img class="icon" src="' . Url::display('/themes/icons/' . $name . '.svg') . '" alt="' . $alts[$name] . '" />'; + } +} |
