From 4766f36a4d74924f21ff329c4318ce4e069ffa04 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 3 Mar 2010 17:53:05 +0000 Subject: Pulled in the interface changes. git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/categories/views/default/categories.php | 48 +++++++++++++++++ mod/categories/views/default/categories/css.php | 61 ++++++++++++++++++++++ mod/categories/views/default/categories/list.php | 41 +++++++++++++++ .../views/default/categories/settings.php | 26 +++++++++ .../views/default/categories/settingsform.php | 7 +++ mod/categories/views/default/categories/view.php | 19 +++++++ 6 files changed, 202 insertions(+) create mode 100644 mod/categories/views/default/categories.php create mode 100644 mod/categories/views/default/categories/css.php create mode 100644 mod/categories/views/default/categories/list.php create mode 100644 mod/categories/views/default/categories/settings.php create mode 100644 mod/categories/views/default/categories/settingsform.php create mode 100644 mod/categories/views/default/categories/view.php (limited to 'mod/categories/views/default') diff --git a/mod/categories/views/default/categories.php b/mod/categories/views/default/categories.php new file mode 100644 index 000000000..f5a41cfa1 --- /dev/null +++ b/mod/categories/views/default/categories.php @@ -0,0 +1,48 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ + + if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) { + $selected_categories = $vars['entity']->universal_categories; + } + $categories = $vars['config']->site->categories; + if (empty($categories)) $categories = array(); + if (empty($selected_categories)) $selected_categories = array(); + + if (!empty($categories)) { + if (!is_array($categories)) $categories = array($categories); + +?> + +

+
+

+ + $categories, + 'value' => $selected_categories, + 'internalname' => 'universal_categories_list' + )); + +?> + +

+
+ +'; + } + +?> \ No newline at end of file diff --git a/mod/categories/views/default/categories/css.php b/mod/categories/views/default/categories/css.php new file mode 100644 index 000000000..d2cf5a8a8 --- /dev/null +++ b/mod/categories/views/default/categories/css.php @@ -0,0 +1,61 @@ + + +.categories .input-checkboxes { + padding:0; + margin:2px 5px 0 0; +} +.categories label { + font-size: 100%; + line-height:1.2em; +} + +#two_column_left_sidebar_maincontent .contentWrapper h2.categoriestitle { + padding: 0 0 3px 0; + margin:0; + font-size:120%; + color:#333333; +} +#two_column_left_sidebar_maincontent .contentWrapper .categories { + border:1px solid #CCCCCC; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + padding:5px; + margin:0 0 15px 0; +} +#two_column_left_sidebar_maincontent .contentWrapper .categories p { + margin:0; +} +#two_column_left_sidebar_maincontent .contentWrapper .blog_post .categories { + border:none; + margin:0; + padding:0; +} + +#two_column_left_sidebar .blog_categories { + background:white; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + padding:10px; + margin:0 10px 10px 10px; +} +#two_column_left_sidebar .blog_categories h2 { + background:none; + border-top:none; + margin:0; + padding:0 0 5px 0; + font-size:1.25em; + line-height:1.2em; + color:#0054A7; +} +#two_column_left_sidebar .blog_categories ul { + color:#0054A7; + margin:5px 0 0 0; +} \ No newline at end of file diff --git a/mod/categories/views/default/categories/list.php b/mod/categories/views/default/categories/list.php new file mode 100644 index 000000000..b6f9f4302 --- /dev/null +++ b/mod/categories/views/default/categories/list.php @@ -0,0 +1,41 @@ +site->categories; + + if ($categories) { + if (!is_array($categories)) $categories = array($categories); + + if (!empty($vars['subtype'])) { + $flag = array(); + $owner_guid = ''; + if (isset($vars['owner_guid'])) $owner_guid = (int) $vars['owner_guid']; + if ($cats = get_tags(0,999,'universal_categories','object',$vars['subtype'],$owner_guid)) + foreach($cats as $cat) + $flag[] = $cat->tag; + + } else { + $flag = null; + } + + if (is_null($flag) || !empty($flag)) { + +?> + +

+
+ '. $category .''; + } + } + if (!empty($catstring)) echo ""; + + ?> +
+ \ No newline at end of file diff --git a/mod/categories/views/default/categories/settings.php b/mod/categories/views/default/categories/settings.php new file mode 100644 index 000000000..6c55d88f9 --- /dev/null +++ b/mod/categories/views/default/categories/settings.php @@ -0,0 +1,26 @@ + + +
+

+ +

+ + + $vars['url'] . 'action/categories/save', + 'method' => 'post', + 'body' => elgg_view('categories/settingsform',$vars) + ) + ); + +?> + +
\ No newline at end of file diff --git a/mod/categories/views/default/categories/settingsform.php b/mod/categories/views/default/categories/settingsform.php new file mode 100644 index 000000000..044f01dcd --- /dev/null +++ b/mod/categories/views/default/categories/settingsform.php @@ -0,0 +1,7 @@ + $vars['categories'], + 'internalname' => 'categories')); + +?> + \ No newline at end of file diff --git a/mod/categories/views/default/categories/view.php b/mod/categories/views/default/categories/view.php new file mode 100644 index 000000000..ef092ce84 --- /dev/null +++ b/mod/categories/views/default/categories/view.php @@ -0,0 +1,19 @@ +universal_categories; + if (!empty($categories)) { + if (!is_array($categories)) $categories = array($categories); + foreach($categories as $category) { + $link = $vars['url'] . 'search?tagtype=universal_categories&tag=' . urlencode($category); + if (!empty($linkstr)) $linkstr .= ', '; + $linkstr .= '' . $category . ''; + } + } + + } + echo $linkstr; + +?> \ No newline at end of file -- cgit v1.2.3