-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advanced search meets CSS grid #4076
Open
crhallberg
wants to merge
4
commits into
vufind-org:dev
Choose a base branch
from
crhallberg:grid-adv-search
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+26
−18
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
17b4b3c
refactor: adv search layout with CSS grid for more flexibility and st…
crhallberg f9aca1a
chore: update-bootstrap5
crhallberg 8b90b84
chore: merge and compile less.
crhallberg 19cf126
Merge remote-tracking branch 'origin/dev' into grid-adv-search
crhallberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,20 +84,26 @@ | |
<?php if (!empty($lastSort)): ?> | ||
<input type="hidden" name="sort" value="<?=$this->escapeHtmlAttr($lastSort)?>"> | ||
<?php endif; ?> | ||
<div class="clearfix"> | ||
<h1 class="pull-left flip"><?=$this->transEsc('Advanced Search')?></h1> | ||
<div id="groupJoin" class="form-inline pull-right flip"> | ||
<div class="adv-search-header"> | ||
<h2><?=$this->transEsc('Advanced Search')?></h2> | ||
<div id="groupJoin" class="adv-join-options"> | ||
<label for="groupJoinOptions"><?=$this->transEsc('search_match')?>:</label> | ||
<select id="groupJoinOptions" name="join" class="form-control"> | ||
<option value="AND"<?php if ($searchDetails && $searchDetails->getOperator() == 'ALL'):?> selected<?php endif; ?>><?= $this->transEsc('group_AND') ?></option> | ||
<option value="OR"<?php if ($searchDetails && $searchDetails->getOperator() == 'OR'):?> selected<?php endif; ?>><?= $this->transEsc('group_OR') ?></option> | ||
</select> | ||
</div> | ||
</div> | ||
<a role="button" class="icon-link hidden" id="groupPlaceHolder" href="#"> | ||
|
||
<div id="adv-search-groups"> | ||
<span id="groupPlaceHolder" class="sr-only"></span> | ||
</div> | ||
|
||
<button type="button" id="adv-add-group-btn" class="btn btn-link icon-link hidden"> | ||
<?=$this->icon('ui-add', 'icon-link__icon') ?> | ||
<span class="icon-link__label"><?= $this->transEsc('add_search_group') ?></span> | ||
</a> | ||
</button> | ||
|
||
<?php /* fallback to a fixed set of search groups/fields if JavaScript is turned off */ ?> | ||
<div class="no-js"> | ||
<?php if (!empty($this->formOverride)): ?> | ||
|
@@ -128,16 +134,22 @@ | |
</div> | ||
<?php if ($group == 0 && $search == 0): ?> | ||
</div> | ||
<div class="float-left"> | ||
<span class="search_place_holder hidden"></span> | ||
<a href="#" class="add_search_link icon-link hidden" role="button"> | ||
<?=$this->icon('ui-add', 'icon-link__icon') ?> | ||
<span class="icon-link__label"><?=$this->transEsc('add_search')?></span> | ||
</a> | ||
</div> | ||
|
||
<span class="search_place_holder sr-only"></span> | ||
|
||
<button href="#" class="add_search_link hidden"> | ||
<?=$this->icon('ui-add', 'icon-link__icon') ?> | ||
<span class="icon-link__label"><?=$this->transEsc('add_search')?></span> | ||
</button> | ||
|
||
<button type="button" class="adv-group-close hidden"> | ||
<?=$this->icon('ui-remove', 'icon-link__icon') ?> | ||
<span class="icon-link__label"><?=$this->transEsc('del_search') ?></span> | ||
</button> | ||
<?php endif; ?> | ||
<?php endfor; ?> | ||
</div> | ||
|
||
<div class="adv-group-match"> | ||
<label class="search_bool"><?=$this->transEsc('search_match')?>: </label> | ||
<select name="bool<?=$group ?>[]" id="search_bool<?=$group ?>" class="form-control"> | ||
|
@@ -146,10 +158,6 @@ | |
<option value="NOT"<?php if (isset($setSearchGroups[$group]) && 'NOT' == $setSearchGroups[$group]):?> selected<?php endif; ?>><?=$this->transEsc('search_NOT')?></option> | ||
</select> | ||
</div> | ||
<a href="#" class="adv-group-close icon-link hidden" role="button"> | ||
<?=$this->icon('ui-remove', 'icon-link__icon') ?> | ||
<span class="icon-link__label"><?=$this->transEsc('del_search') ?></span> | ||
</a> | ||
</div> | ||
<?php if ($group == 0): ?> | ||
</div> | ||
|
@@ -229,7 +237,7 @@ | |
</div> | ||
<?php | ||
$script = <<<JS | ||
$('#groupPlaceHolder').click(function(e) { | ||
$('#adv-add-group-btn').click(function(e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth de-jQuerying this while we're changing it anyway, since I think it would be a pretty minor change? |
||
addGroup(null, null, null, true); | ||
return false; | ||
}) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be undoing #4221, which is probably not the desired outcome.