From 34eb79e6ba2255113eca6d30ae6c65b28d63abfa Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 23 Mar 2014 16:20:44 -0700 Subject: provide 'style' option to archive widget to choose between 'select' and 'list' format --- include/widgets.php | 2 ++ view/theme/redbasic/css/style.css | 2 +- view/tpl/posted_date_widget.tpl | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/widgets.php b/include/widgets.php index 90586397f..82769d925 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -306,6 +306,7 @@ function widget_archive($arr) { $wall = ((array_key_exists('wall', $arr)) ? intval($arr['wall']) : 0); + $style = ((array_key_exists('style', $arr)) ? $arr['style'] : 'select'); $url = z_root() . '/' . $a->cmd; @@ -318,6 +319,7 @@ function widget_archive($arr) { '$title' => t('Archives'), '$size' => ((count($ret) > 6) ? 6 : count($ret)), '$url' => $url, + '$style' => $style, '$dates' => $ret )); return $o; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index ecb9352ec..6a4f836b1 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2114,7 +2114,7 @@ img.mail-list-sender-photo { list-style-type: none; } -#sidebar-group-list ul { +#sidebar-group-list ul, #posted-date-selector { list-style-type: none; } diff --git a/view/tpl/posted_date_widget.tpl b/view/tpl/posted_date_widget.tpl index 6720d3628..1a8323926 100755 --- a/view/tpl/posted_date_widget.tpl +++ b/view/tpl/posted_date_widget.tpl @@ -1,9 +1,17 @@

{{$title}}

+{{if $style == 'list'}} + +{{else}} +{{/if}}
-- cgit v1.2.3