-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28688 from colemanw/searchKitTabs
dev/user-interface#49 - SearchKit: improve tabbed interface
- Loading branch information
Showing
16 changed files
with
285 additions
and
186 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<fieldset class="api4-clause-fieldset crm-search-wheres"> | ||
<crm-search-clause clauses="$ctrl.savedSearch.api_params.where" format="string" op="AND" label="{{:: ts('Where') }}" fields="fieldsForWhere" allow-functions="true" ></crm-search-clause> | ||
</fieldset> | ||
<fieldset ng-if="$ctrl.paramExists('having')" class="api4-clause-fieldset crm-search-havings"> | ||
<crm-search-clause clauses="$ctrl.savedSearch.api_params.having" format="string" op="AND" label="{{:: ts('Having') }}" help="having" fields="fieldsForHaving" ></crm-search-clause> | ||
</fieldset> | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="crm-search-select-fields"> | ||
<crm-search-admin-fields></crm-search-admin-fields> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<div class="form-inline"> | ||
<label for="crm-search-main-entity">{{:: ts('Search for') }}</label> | ||
<input id="crm-search-main-entity" class="form-control huge collapsible-optgroups" ng-model="$ctrl.savedSearch.api_entity" crm-ui-select="::{allowClear: false, data: mainEntitySelect}" ng-disabled="$ctrl.savedSearch.id"> | ||
</div> | ||
<div ng-if=":: $ctrl.paramExists('join')" class="crm-search-joins"> | ||
<fieldset ng-repeat="join in $ctrl.savedSearch.api_params.join" class="crm-search-join"> | ||
<div class="form-inline"> | ||
<select class="form-control" ng-model="join[1]" ng-change="$ctrl.changeJoinType(join)" ng-options="o.k as o.v for o in ::joinTypes" ></select> | ||
<input id="crm-search-join-{{ $index }}" class="form-control huge" ng-model="join[0]" crm-ui-select="{placeholder: ' ', data: getJoinEntities}" disabled > | ||
<button type="button" class="btn btn-xs btn-danger-outline" ng-click="$ctrl.removeJoin($index)" title="{{:: ts('Remove join') }}"> | ||
<i class="crm-i fa-trash" aria-hidden="true"></i> | ||
</button> | ||
</div> | ||
<div class="api4-clause-fieldset"> | ||
<crm-search-clause clauses="join" format="json" skip="2 + getJoin(join[0]).conditions.length" op="AND" label="{{:: ts('If') }}" hide-label="true" placeholder="ts('Add Condition')" fields="fieldsForJoin(join[0])" ></crm-search-clause> | ||
</div> | ||
</fieldset> | ||
<fieldset class="crm-search-join-add"> | ||
<div class="form-inline"> | ||
<select class="form-control" ng-model="controls.joinType" ng-options="o.k as o.v for o in ::joinTypes" ></select> | ||
<input id="crm-search-add-join" | ||
class="form-control crm-action-menu fa-plus" | ||
crm-ui-select="{placeholder: ts('Entity'), data: getJoinEntities, dropdownCss: {width: '275px'}}" | ||
on-crm-ui-select="$ctrl.addJoin(selection)"> | ||
</div> | ||
</fieldset> | ||
</div> | ||
<fieldset ng-if=":: $ctrl.paramExists('groupBy')" class="crm-search-groupbys"> | ||
<div class="form-inline" ng-repeat="groupBy in $ctrl.savedSearch.api_params.groupBy" class="crm-search-groupby"> | ||
<label for="crm-search-groupBy-{{ $index }}">{{:: ts('Group By') }}</label> | ||
<crm-search-function class="form-group" expr="$ctrl.savedSearch.api_params.groupBy[$index]" mode="groupBy"></crm-search-function> | ||
<span ng-if="!$ctrl.hasFunction($ctrl.savedSearch.api_params.groupBy[$index])"> | ||
<input id="crm-search-groupBy-{{ $index }}" class="form-control huge" ng-model="$ctrl.savedSearch.api_params.groupBy[$index]" crm-ui-select="{placeholder: ' ', data: fieldsForGroupBy}" ng-change="changeGroupBy($index)" /> | ||
</span> | ||
<hr> | ||
</div> | ||
<div class="form-inline crm-search-groupby-add"> | ||
<input id="crm-search-add-groupBy" | ||
class="form-control crm-action-menu fa-plus" | ||
crm-ui-select="{placeholder: ts('Group By'), data: fieldsForGroupBy, dropdownCss: {width: '300px'}}" | ||
on-crm-ui-select="$ctrl.addParam('groupBy', selection)" > | ||
</div> | ||
</fieldset> |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div> | ||
<strong>API:</strong> | ||
</div> | ||
<pre>{{ $ctrl.debug.apiParams }}</pre> | ||
<pre ng-if="$ctrl.debug.timeIndex">{{ ts('Request took %1 seconds.', {1: $ctrl.debug.timeIndex}) }}</pre> | ||
<div ng-if="$ctrl.perm.viewDebugOutput"> | ||
<strong>SQL:</strong> | ||
<pre ng-if="!$ctrl.debug.sql">{{:: ts('Run search to view SQL') }}</pre> | ||
<pre ng-repeat="query in $ctrl.debug.sql">{{ query }}</pre> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<textarea class="form-control" placeholder="{{:: ts('Description (shown above default display)') }}" ng-model="$ctrl.savedSearch.description"></textarea> | ||
<div class="form-group"> | ||
<label class="sr-only" for="expires_date">{{:: ts('Search Expiry Date') }}</label> | ||
<div class="input-group"> | ||
<div class="input-group-addon"><i class="crm-i fa-calendar-times-o"></i></div> | ||
<input id="expires_date" class="form-control" crm-ui-datepicker="{time: true}" ng-model="$ctrl.savedSearch.expires_date" placeholder="Expires"> | ||
</div> | ||
</div> | ||
<crm-search-admin-tags tag-ids="$ctrl.savedSearch.tag_id" class="btn-group btn-group-sm"></crm-search-admin-tags> |
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
Oops, something went wrong.