Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
criteria editor can display simple existing expression trees
- Loading branch information
Florian Koch
committed
May 22, 2017
1 parent
2716594
commit cd72339
Showing
6 changed files
with
81 additions
and
12 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
app/cells/criteria_operator/ui_component/criteria_editor/group_row.erb
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
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
<div class="criteria_editor_row_wrapper"> | ||
<div class="criteria_editor_empty_placeholder">It's lonely inside here...</div> | ||
<% if empty? %> | ||
<div class="criteria_editor_empty_placeholder">It's lonely inside here...</div> | ||
<% else %> | ||
<% c = 0 %> | ||
<% model.operand_collection.each do |operand| %> | ||
<%= cell('criteria_operator/ui_component/criteria_editor', operand).(:choose_template, locator: c) %> | ||
<% c += 1 %> | ||
<% end %> | ||
<% end %> | ||
</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
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
class DummyController < ApplicationController | ||
def show | ||
# first_op = CriteriaOperator::UnaryOperator.new(CriteriaOperator::OperandValue.new(true), CriteriaOperator::UnaryOperatorType::NOT) | ||
# second_op = CriteriaOperator::BinaryOperator.new(CriteriaOperator::OperandProperty.new("column xyz"), CriteriaOperator::OperandValue.new(42), CriteriaOperator::BinaryOperatorType::GREATER_OR_EQUAL) | ||
# @example_op = CriteriaOperator::GroupOperator.new [first_op, second_op], CriteriaOperator::GroupOperatorType::OR | ||
@example_op = CriteriaOperator::GroupOperator.new [], CriteriaOperator::GroupOperatorType::OR | ||
#first_op = CriteriaOperator::UnaryOperator.new(CriteriaOperator::OperandValue.new(true), CriteriaOperator::UnaryOperatorType::NOT) | ||
first_op = CriteriaOperator::GroupOperator.new [], CriteriaOperator::GroupOperatorType::AND | ||
second_op = CriteriaOperator::BinaryOperator.new(CriteriaOperator::OperandProperty.new("column xyz"), CriteriaOperator::OperandValue.new(42), CriteriaOperator::BinaryOperatorType::GREATER_OR_EQUAL) | ||
@example_op = CriteriaOperator::GroupOperator.new [first_op, second_op], CriteriaOperator::GroupOperatorType::OR | ||
# @example_op = CriteriaOperator::GroupOperator.new [], CriteriaOperator::GroupOperatorType::OR | ||
render | ||
end | ||
end |