-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Moved contents of deleted conditions_details view into show view
- Loading branch information
Showing
2 changed files
with
91 additions
and
92 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 |
---|---|---|
@@ -1 +1,91 @@ | ||
= render :partial => 'condition_details' | ||
#condition_details_div | ||
= render :partial => "layouts/flash_msg" | ||
.form-horizontal | ||
-# Don't show basic info box with description only unless in edit mode | ||
%h3= _("Basic Information") | ||
.form-horizontal | ||
.form-group | ||
%label.control-label.col-md-2 | ||
= _("Description") | ||
.col-md-8 | ||
%p.form-control-static | ||
= h(@condition.description) | ||
|
||
.form-horizontal | ||
.form-group | ||
%label.control-label.col-md-2 | ||
= _("Applies To") | ||
.col-md-8 | ||
= Condition::TOWHAT_APPLIES_TO_CLASSES[@edit ? @edit[:new][:towhat] : @condition.towhat] | ||
|
||
%h3= _("Scope") | ||
.form-horizontal | ||
.form-group | ||
%label.control-label.col-md-2 | ||
= _("Description") | ||
.col-md-8 | ||
- if !@applies_to_exp_table.nil? | ||
- @applies_to_exp_table.each do |token| | ||
- if ! ["AND", "OR", "(", ")"].include?([token].flatten.first) | ||
= h([token].flatten.first) | ||
- else | ||
%font{:color => "black"} | ||
%b | ||
= h([token].flatten.first) | ||
- else | ||
= render :partial => 'layouts/info_msg', :locals => {:message => _("No scope defined, the scope of this condition includes all elements.")} | ||
%hr | ||
|
||
%h3= _("Expression") | ||
.form-horizontal | ||
.form-group | ||
%label.control-label.col-md-2 | ||
.col-md-8 | ||
- if !@expression_table.nil? | ||
- @expression_table.each do |token| | ||
- if ! ["AND", "OR", "(", ")"].include?([token].flatten.first) | ||
= h([token].flatten.first) | ||
- else | ||
%font{:color => "black"} | ||
%b | ||
= h([token].flatten.first) | ||
- else | ||
= render :partial => 'layouts/info_msg', :locals => {:message => _("A condition must contain a valid expression.")} | ||
%hr | ||
|
||
-# Notes field | ||
%h3= _("Notes") | ||
.form-horizontal | ||
- if @condition.notes.blank? | ||
= render :partial => 'layouts/info_msg', :locals => {:message => _("No notes have been entered.")} | ||
- else | ||
= text_area_tag("notes", @condition.notes, :readonly => true, :rows => 5) | ||
%hr | ||
|
||
%h3= _("Assigned to Policies") | ||
- if @condition_policies.empty? | ||
= render :partial => 'layouts/info_msg', :locals => {:message => _("This Condition is not assigned to any Policies.")} | ||
- else | ||
%table.table.table-striped.table-bordered.table-hover | ||
%tbody | ||
- @condition_policies.each do |p| | ||
- id = "xx-#{p.mode.downcase}_xx-#{p.mode.downcase}-#{p.towhat.camelize(:lower)}_p-#{p.id}" | ||
%tr{:title => _("Click to view Policy")} | ||
%td.table-view-pf-select | ||
%i{:class => p.decorate.fonticon} | ||
%td | ||
= p.description | ||
- if !@edit | ||
%h3= _("Assigned to Policies") | ||
- if @condition_policies.empty? | ||
= render :partial => 'layouts/info_msg', :locals => {:message => _("This Condition is not assigned to any Policies.")} | ||
- else | ||
%table.table.table-striped.table-bordered.table-hover | ||
%tbody | ||
- @condition_policies.each do |p| | ||
- id = "xx-#{p.mode.downcase}_xx-#{p.mode.downcase}-#{p.towhat.camelize(:lower)}_p-#{p.id}" | ||
%tr{:title => _("Click to view Policy")} | ||
%td.table-view-pf-select | ||
%i{:class => p.decorate.fonticon} | ||
%td | ||
= p.description |