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 #1792 from martinpovolny/pull-request-lgalis-add_e…
…xpression_support_to_custom_button_editor Enablement and Visibility expression UI for custom buttons
- Loading branch information
Showing
19 changed files
with
225 additions
and
36 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-# expression_type | ||
- table_key = "#{expression_type}_table".to_sym | ||
|
||
.div{:id => "form_#{expression_type}_div"} | ||
- if @expkey == expression_type | ||
%h3= title + _("(Choose an element of the expression to edit)") | ||
= render :partial => 'layouts/exp_editor' | ||
- else | ||
%h3= title + _('(Press the "Edit" button to edit the expression)') | ||
= link_to(image_tag('toolbars/edit.png', :border => "0", :alt => (t = _("Edit this Expression"))), | ||
{:action => 'button_update', :button => expression_type}, | ||
{"data-miq_sparkle_on" => true, "data-miq_sparkle_off" => true, :remote => true, "data-method" => :post, :title => t}) | ||
%br | ||
- if @edit[table_key].nil? | ||
= render :partial => 'layouts/info_msg', | ||
:locals => {:message => _("No enablement expression defined.")} | ||
- else | ||
- @edit[table_key].each do |token| | ||
- if !["AND", "OR", "(", ")"].include?([token].flatten.first) | ||
= h([token].flatten.first) | ||
- else | ||
%font{:color => "black"} | ||
%b | ||
= h([token].flatten.first) | ||
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= render :partial => 'layouts/custom_button_expression', | ||
:locals => {:expression_type => :enablement_expression, | ||
:title => _('Enablement Expression')} |
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 @@ | ||
= render :partial => 'layouts/custom_button_expression', | ||
:locals => {:expression_type => :visibility_expression, | ||
:title => _('Visibility Expression')} |
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.