Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

search block with elemental formatting and modifications to not require ... #380

Merged
merged 1 commit into from

2 participants

@evancooper
Collaborator

...a title or a button. not sure how this will jive with jobbrowns changes to fix the pagelist support, but fingers crossed :pray:

@evancooper evancooper search block with elemental formatting and modifications to not requi…
…re a title or a button. not sure how this will jive with jobbrowns changes to fix the pagelist support, but fingers crossed :pray:
136fcf9
@aembler aembler merged commit 136fcf9 into concrete5:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 7, 2014
  1. @evancooper

    search block with elemental formatting and modifications to not requi…

    evancooper authored
    …re a title or a button. not sure how this will jive with jobbrowns changes to fix the pagelist support, but fingers crossed :pray:
This page is out of date. Refresh to see the latest.
View
21 web/application/themes/elemental/css/build/header.less
@@ -10,7 +10,26 @@ header {
color: @header-brand-color;
font-size: @header-brand-font-size;
}
-
+ .ccm-search-block-form {
+ position: relative;
+ &:before {
+ content: "\f002";
+ font-family: FontAwesome;
+ font-weight: normal;
+ font-style: normal;
+ display: inline-block;
+ position: absolute;
+ left: 14px;
+ top: 9px;
+ text-decoration: inherit;
+ color: #d2d2d2;
+ }
+ .ccm-search-block-text {
+ border: 1px solid #e6e6e6;
+ border-radius: 30px;
+ padding: 10px 20px 10px 35px;
+ }
+ }
nav {
View
20 web/concrete/blocks/search/controller.php
@@ -31,18 +31,6 @@ public function highlightedMarkup($fulltext, $highlight) {
return $this->hText;
}
- public function validate($post) {
- $errors = Loader::helper('validation/error');
- if ($post['title'] === false || $post['title'] == '') {
- $errors->add(t("Please enter your Search Title."));
- }
- if ($post['buttonText'] === false || $post['buttonText'] == '') {
- $errors->add(t("Please enter your Submit Button Text."));
- }
-
- return $errors;
- }
-
public function highlightedExtendedMarkup($fulltext, $highlight) {
$text = @preg_replace("#\n|\r#", ' ', $fulltext);
@@ -93,15 +81,8 @@ public function getBlockTypeName() {
return t("Search");
}
- public function getJavaScriptStrings() {
- return array('search-title' => t('Please enter a valid search title.'));
- }
-
function __construct($obj = null) {
parent::__construct($obj);
- if ($this->title == '') {
- $this->title=t("Search");
- }
}
public function indexExists() {
@@ -166,7 +147,6 @@ function do_search() {
$ipl = new IndexedPageList();
$aksearch = false;
- $ipl->ignoreAliases();
if (is_array($_REQUEST['akID'])) {
foreach($_REQUEST['akID'] as $akID => $req) {
$fak = CollectionAttributeKey::getByID($akID);
View
5 web/concrete/blocks/search/view.php
@@ -7,7 +7,6 @@
<form action="<?=$view->url( $resultTargetURL )?>" method="get" class="ccm-search-block-form">
<? if( strlen($title)>0){ ?><h3><?=$title?></h3><? } ?>
-
<? if(strlen($query)==0){ ?>
<input name="search_paths[]" type="hidden" value="<?=htmlentities($baseSearchPath, ENT_COMPAT, APP_CHARSET) ?>" />
<? } else if (is_array($_REQUEST['search_paths'])) {
@@ -17,8 +16,10 @@
} ?>
<input name="query" type="text" value="<?=htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" class="ccm-search-block-text" />
-
+
+ <? if($buttonText) { ?>
<input name="submit" type="submit" value="<?=$buttonText?>" class="ccm-search-block-submit" />
+ <? } ?>
<?
$tt = Loader::helper('text');
Something went wrong with that request. Please try again.