aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-22 18:20:10 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-22 18:20:10 +0000
commitb36bf0e97e8dfbf2dcd07d4173392a3dcfbc2df0 (patch)
treeeadba4e265c097359389b866919201858c5ffdd5 /views/default
parentcb01252489f233535e2057457cfe90920f82f96d (diff)
downloadelgg-b36bf0e97e8dfbf2dcd07d4173392a3dcfbc2df0.tar.gz
elgg-b36bf0e97e8dfbf2dcd07d4173392a3dcfbc2df0.tar.bz2
Pulling in MITRE's search core. Fo'rizzle this time. Yo.
git-svn-id: http://code.elgg.org/elgg/trunk@3572 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/css.php77
-rw-r--r--views/default/entities/entity_list.php62
-rw-r--r--views/default/entities/entity_listing.php37
-rw-r--r--views/default/entities/gallery.php (renamed from views/default/search/gallery.php)82
-rw-r--r--views/default/entities/gallery_listing.php (renamed from views/default/search/gallery_listing.php)58
-rw-r--r--views/default/page_elements/elgg_topbar.php5
-rw-r--r--views/default/search/entity_list.php64
-rw-r--r--views/default/search/listing.php38
-rw-r--r--views/default/search/startblurb.php15
9 files changed, 193 insertions, 245 deletions
diff --git a/views/default/css.php b/views/default/css.php
index feca46216..da91e07a8 100644
--- a/views/default/css.php
+++ b/views/default/css.php
@@ -560,37 +560,6 @@ HORIZONTAL ELGG TOPBAR
display:none;
position:relative;
}
-#searchform input.search_input {
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- background-color:#FFFFFF;
- border:1px solid #BBBBBB;
- color:#999999;
- font-size:12px;
- font-weight:bold;
- margin:0pt;
- padding:2px;
- width:180px;
- height:12px;
-}
-#searchform input.search_submit_button {
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- color:#333333;
- background: #cccccc;
- border:none;
- font-size:12px;
- font-weight:bold;
- margin:0px;
- padding:2px;
- width:auto;
- height:18px;
- cursor:pointer;
-}
-#searchform input.search_submit_button:hover {
- color:#ffffff;
- background: #4690d6;
-}
/* ***************************************
@@ -1274,9 +1243,9 @@ p.user_menu_friends_of {
}
/* ***************************************
- SEARCH LISTINGS
+ ENTITY LISTINGS
*************************************** */
-.search_listing {
+.entity_listing {
display: block;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
@@ -1284,80 +1253,80 @@ p.user_menu_friends_of {
margin:0 10px 5px 10px;
padding:5px;
}
-.search_listing_icon {
+.entity_listing_icon {
float:left;
}
-.search_listing_icon img {
+.entity_listing_icon img {
width: 40px;
}
-.search_listing_icon .avatar_menu_button img {
+.entity_listing_icon .avatar_menu_button img {
width: 15px;
}
-.search_listing_info {
+.entity_listing_info {
margin-left: 50px;
min-height: 40px;
}
/* IE 6 fix */
-* html .search_listing_info {
+* html .entity_listing_info {
height:40px;
}
-.search_listing_info p {
+.entity_listing_info p {
margin:0 0 3px 0;
line-height:1.2em;
}
-.search_listing_info p.owner_timestamp {
+.entity_listing_info p.owner_timestamp {
margin:0;
padding:0;
color:#666666;
font-size: 90%;
}
-table.search_gallery {
+table.entity_gallery {
border-spacing: 10px;
margin:0 0 0 0;
}
-.search_gallery td {
+.entity_gallery td {
padding: 5px;
}
-.search_gallery_item {
+.entity_gallery_item {
background: white;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
width:170px;
}
-.search_gallery_item:hover {
+.entity_gallery_item:hover {
background: black;
color:white;
}
-.search_gallery_item .search_listing {
+.entity_gallery_item .entity_listing {
background: none;
text-align: center;
}
-.search_gallery_item .search_listing_header {
+.entity_gallery_item .entity_listing_header {
text-align: center;
}
-.search_gallery_item .search_listing_icon {
+.entity_gallery_item .entity_listing_icon {
position: relative;
text-align: center;
}
-.search_gallery_item .search_listing_info {
+.entity_gallery_item .entity_listing_info {
margin: 5px;
}
-.search_gallery_item .search_listing_info p {
+.entity_gallery_item .entity_listing_info p {
margin: 5px;
margin-bottom: 10px;
}
-.search_gallery_item .search_listing {
+.entity_gallery_item .entity_listing {
background: none;
text-align: center;
}
-.search_gallery_item .search_listing_icon {
+.entity_gallery_item .entity_listing_icon {
position: absolute;
margin-bottom: 20px;
}
-.search_gallery_item .search_listing_info {
+.entity_gallery_item .entity_listing_info {
margin: 5px;
}
-.search_gallery_item .search_listing_info p {
+.entity_gallery_item .entity_listing_info p {
margin: 5px;
margin-bottom: 10px;
}
@@ -2376,7 +2345,7 @@ h3.settings {
.admin_statistics table tr:hover {
background: #E4E4E4;
}
-.admin_users_online .search_listing {
+.admin_users_online .entity_listing {
margin:0 0 5px 0;
padding:5px;
border:2px solid #cccccc;
diff --git a/views/default/entities/entity_list.php b/views/default/entities/entity_list.php
new file mode 100644
index 000000000..81fd102e3
--- /dev/null
+++ b/views/default/entities/entity_list.php
@@ -0,0 +1,62 @@
+<?php
+
+ $context = $vars['context'];
+ $offset = $vars['offset'];
+ $entities = $vars['entities'];
+ $limit = $vars['limit'];
+ $count = $vars['count'];
+ $baseurl = $vars['baseurl'];
+ $context = $vars['context'];
+ $viewtype = $vars['viewtype'];
+ $pagination = $vars['pagination'];
+ $fullview = $vars['fullview'];
+
+ $html = "";
+ $nav = "";
+
+ if (isset($vars['viewtypetoggle'])) {
+ $viewtypetoggle = $vars['viewtypetoggle'];
+ } else {
+ $viewtypetoggle = true;
+ }
+
+ if ($context == "search" && $count > 0 && $viewtypetoggle) {
+ $nav .= elgg_view("navigation/viewtype",array(
+
+ 'baseurl' => $baseurl,
+ 'offset' => $offset,
+ 'count' => $count,
+ 'viewtype' => $viewtype,
+
+ ));
+ }
+
+ if ($pagination)
+ $nav .= elgg_view('navigation/pagination',array(
+
+ 'baseurl' => $baseurl,
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+
+ ));
+
+ $html .= $nav;
+
+ if ($viewtype == "list") {
+ if (is_array($entities) && sizeof($entities) > 0) {
+ foreach($entities as $entity) {
+ $html .= elgg_view_entity($entity, $fullview);
+ }
+ }
+ } else {
+ if (is_array($entities) && sizeof($entities) > 0)
+ $html .= elgg_view("entities/gallery",array('entities' => $entities));
+ }
+
+ if ($count)
+ $html .= $nav;
+
+ echo $html;
+
+?>
diff --git a/views/default/entities/entity_listing.php b/views/default/entities/entity_listing.php
new file mode 100644
index 000000000..dd07e7d01
--- /dev/null
+++ b/views/default/entities/entity_listing.php
@@ -0,0 +1,37 @@
+<?php
+
+ /**
+ * Elgg search listing
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+?>
+
+ <div class="entity_listing">
+
+ <div class="entity_listing_icon">
+ <?php
+
+ echo $vars['icon'];
+
+ ?>
+ </div>
+ <div class="entity_listing_info">
+ <?php
+
+ echo $vars['info'];
+
+ ?>
+ </div>
+
+ </div>
+
+<?php
+
+?> \ No newline at end of file
diff --git a/views/default/search/gallery.php b/views/default/entities/gallery.php
index 52c4d0b92..a2701ed0c 100644
--- a/views/default/search/gallery.php
+++ b/views/default/entities/gallery.php
@@ -1,44 +1,44 @@
-<?php
-/**
- * Elgg gallery view
- *
- * @package Elgg
+<?php
+/**
+ * Elgg gallery view
+ *
+ * @package Elgg
* @subpackage Core
* @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-$entities = $vars['entities'];
-if (is_array($entities) && sizeof($entities) > 0) {
-
-?>
-
-<table class="search_gallery">
-
-<?php
-
- $col = 0;
- foreach($entities as $entity) {
- if ($col == 0) {
-
- echo "<tr>";
-
- }
- echo "<td class=\"search_gallery_item\">";
- echo elgg_view_entity($entity);
- echo "</td>";
- $col++;
- if ($col > 3) {
- echo "</tr>";
- $col = 0;
- }
- }
- if ($col > 0) echo "</tr>";
-
-?>
-
-</table>
-
-<?php
-
+ * @link http://elgg.org/
+ */
+
+$entities = $vars['entities'];
+if (is_array($entities) && sizeof($entities) > 0) {
+
+?>
+
+<table class="entity_gallery">
+
+<?php
+
+ $col = 0;
+ foreach($entities as $entity) {
+ if ($col == 0) {
+
+ echo "<tr>";
+
+ }
+ echo "<td class=\"entity_gallery_item\">";
+ echo elgg_view_entity($entity);
+ echo "</td>";
+ $col++;
+ if ($col > 3) {
+ echo "</tr>";
+ $col = 0;
+ }
+ }
+ if ($col > 0) echo "</tr>";
+
+?>
+
+</table>
+
+<?php
+
} \ No newline at end of file
diff --git a/views/default/search/gallery_listing.php b/views/default/entities/gallery_listing.php
index 900b22832..5421bcecb 100644
--- a/views/default/search/gallery_listing.php
+++ b/views/default/entities/gallery_listing.php
@@ -1,32 +1,32 @@
-<?php
-/**
- * Elgg search listing: gallery view
- *
- * @package Elgg
+<?php
+/**
+ * Elgg entity listing: gallery view
+ *
+ * @package Elgg
* @subpackage Core
* @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-?>
-
-<div class="search_listing">
-
- <div class="search_listing_header">
-
- <?php
-
- echo $vars['icon'];
-
- ?>
-
- </div>
- <div class="search_listing_info">
- <?php
-
- echo $vars['info'];
-
- ?>
- </div>
-
+ * @link http://elgg.org/
+ */
+
+?>
+
+<div class="entity_listing">
+
+ <div class="entity_listing_header">
+
+ <?php
+
+ echo $vars['icon'];
+
+ ?>
+
+ </div>
+ <div class="entity_listing_info">
+ <?php
+
+ echo $vars['info'];
+
+ ?>
+ </div>
+
</div> \ No newline at end of file
diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php
index b9609910c..00240f35e 100644
--- a/views/default/page_elements/elgg_topbar.php
+++ b/views/default/page_elements/elgg_topbar.php
@@ -66,10 +66,7 @@
</div>
<div id="elgg_topbar_container_search">
-<form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get">
- <input type="text" size="21" name="tag" value="<?php echo elgg_echo('search'); ?>" onclick="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' }" class="search_input" />
- <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" />
-</form>
+<?php echo elgg_view('page_elements/searchbox'); ?>
</div>
</div><!-- /#elgg_topbar -->
diff --git a/views/default/search/entity_list.php b/views/default/search/entity_list.php
deleted file mode 100644
index 07e76e955..000000000
--- a/views/default/search/entity_list.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/**
- * @package Elgg
- * @author Curverider
- * @link http://elgg.com/
- */
-
-$context = $vars['context'];
-$offset = $vars['offset'];
-$entities = $vars['entities'];
-$limit = $vars['limit'];
-$count = $vars['count'];
-$baseurl = $vars['baseurl'];
-$context = $vars['context'];
-$viewtype = $vars['viewtype'];
-$pagination = $vars['pagination'];
-$fullview = $vars['fullview'];
-
-$html = "";
-$nav = "";
-
-if (isset($vars['viewtypetoggle'])) {
- $viewtypetoggle = $vars['viewtypetoggle'];
-} else {
- $viewtypetoggle = true;
-}
-
-if ($context == "search" && $count > 0 && $viewtypetoggle) {
- $nav .= elgg_view("navigation/viewtype",array(
- 'baseurl' => $baseurl,
- 'offset' => $offset,
- 'count' => $count,
- 'viewtype' => $viewtype,
- ));
-}
-
-if ($pagination) {
- $nav .= elgg_view('navigation/pagination',array(
- 'baseurl' => $baseurl,
- 'offset' => $offset,
- 'count' => $count,
- 'limit' => $limit,
- ));
-}
-
-$html .= $nav;
-
-if ($viewtype == "list") {
- if (is_array($entities) && sizeof($entities) > 0) {
- foreach($entities as $entity) {
- $html .= elgg_view_entity($entity, $fullview);
- }
- }
-} else {
- if (is_array($entities) && sizeof($entities) > 0) {
- $html .= elgg_view("search/gallery",array('entities' => $entities));
- }
-}
-
-if ($count) {
- $html .= $nav;
-}
-
-echo $html; \ No newline at end of file
diff --git a/views/default/search/listing.php b/views/default/search/listing.php
deleted file mode 100644
index fa1719069..000000000
--- a/views/default/search/listing.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/**
- * Elgg search listing
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-if (isset($vars['search_viewtype']) && $vars['search_viewtype'] == "gallery") {
- echo elgg_view("search/gallery_listing",$vars);
-} else {
-
-?>
-
-<div class="search_listing">
-
- <div class="search_listing_icon">
- <?php
-
- echo $vars['icon'];
-
- ?>
- </div>
- <div class="search_listing_info">
- <?php
-
- echo $vars['info'];
-
- ?>
- </div>
-
-</div>
-
-<?php
-
-} \ No newline at end of file
diff --git a/views/default/search/startblurb.php b/views/default/search/startblurb.php
deleted file mode 100644
index 7c78cbf16..000000000
--- a/views/default/search/startblurb.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-?>
-<div class="contentWrapper">
- <?php
-
- echo sprintf(elgg_echo("tag:search:startblurb"),$vars['tag']);
-
- ?>
-</div> \ No newline at end of file