-
Notifications
You must be signed in to change notification settings - Fork 66
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 #51 from upmin/isolate_admin_code
Isolating Admin Code
- Loading branch information
Showing
59 changed files
with
1,158 additions
and
808 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 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
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,24 +1,9 @@ | ||
%h4{style: "color: #333;"} | ||
= action.title | ||
.well.action-well | ||
= form_tag(upmin_action_path(upmin_model.path_hash.merge(method: action_name))) do | ||
- upmin_model.action_parameters(action_name).each do |param_type, param_name| | ||
|
||
- next if param_type == :block # Skip blocks | ||
|
||
.form-group | ||
= label(action_name, param_name, param_name.to_s.capitalize.gsub("_", " ")) | ||
|
||
- if param_type == :opt | ||
.input-group | ||
= text_field(action_name, param_name, class: "form-control") | ||
.input-group-addon.nilable-addon | ||
.form-group | ||
%label{for: "#{action_name}_#{param_name}_is_nil"} | ||
Do Not Provide | ||
= check_box(action_name, "#{param_name}_is_nil", class: "boolean") | ||
%small | ||
* Optional | ||
- else | ||
= text_field(action_name, param_name, class: "form-control") | ||
|
||
= form_tag(action.path, class: action.name) do | ||
- action.parameters.each do |parameter| | ||
-# = Upmin::Railties::RenderHelpers.parameter_partials(parameter) | ||
= up_render(parameter) | ||
|
||
= submit_tag("Submit", class: "btn btn-primary") |
18 changes: 8 additions & 10 deletions
18
app/views/upmin/partials/associations/_associations.html.haml
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,14 +1,12 @@ | ||
- if associations.any? | ||
%p | ||
- associations.each do |u| | ||
- nested_upmin_model = Upmin::Model.new(u) | ||
%a.active-tag-link{href: upmin_model_path(nested_upmin_model.path_hash)} | ||
%span.label{class: nested_upmin_model.color} | ||
= nested_upmin_model.title | ||
%h5 | ||
= association.title | ||
|
||
- else | ||
- if association.empty? | ||
%p.well | ||
None | ||
|
||
|
||
|
||
- else | ||
- association.upmin_values.each do |m| | ||
%a.active-tag-link{href: m.path} | ||
%span.label{class: m.color} | ||
= m.title |
Oops, something went wrong.