From 1ad57c74732e4463cfa5051e975c54f4e65d7e09 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 19 Mar 2016 18:04:22 -0400 Subject: Add buttons in project overview sections --- app/Helper/UrlHelper.php | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'app/Helper') diff --git a/app/Helper/UrlHelper.php b/app/Helper/UrlHelper.php index cad9fdef..095c4af4 100644 --- a/app/Helper/UrlHelper.php +++ b/app/Helper/UrlHelper.php @@ -29,18 +29,37 @@ class UrlHelper extends Base } /** - * HTML Link tag + * Button Link Element * * @access public - * @param string $label Link label + * @param string $icon Font-Awesome icon + * @param string $label Link label * @param string $controller Controller name - * @param string $action Action name - * @param array $params Url parameters - * @param boolean $csrf Add a CSRF token - * @param string $class CSS class attribute + * @param string $action Action name + * @param array $params Url parameters + * @param string $class CSS class attribute + * @return string + */ + public function button($icon, $label, $controller, $action, array $params = array(), $class = '') + { + $icon = ' '; + $class = 'btn '.$class; + return $this->link($icon.$label, $controller, $action, $params, false, $class); + } + + /** + * Link element + * + * @access public + * @param string $label Link label + * @param string $controller Controller name + * @param string $action Action name + * @param array $params Url parameters + * @param boolean $csrf Add a CSRF token + * @param string $class CSS class attribute * @param string $title - * @param boolean $new_tab Open the link in a new tab - * @param string $anchor Link Anchor + * @param boolean $new_tab Open the link in a new tab + * @param string $anchor Link Anchor * @return string */ public function link($label, $controller, $action, array $params = array(), $csrf = false, $class = '', $title = '', $new_tab = false, $anchor = '') -- cgit v1.2.3