From d85e6c5b83a45ac2084ac5bca75e6b8a069e07a0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 24 Nov 2013 20:42:55 +0100 Subject: Refactorise icon() dans RSSThemes::icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/284 --- app/models/RSSThemes.php | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'app/models/RSSThemes.php') 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 '' . $alts[$name] . ''; + //return '' . $alts[$name] . ''; + } +} -- cgit v1.2.3