This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added class to page div, ability to view a form builder's responses.
- Loading branch information
Josh Adams
committed
Jan 28, 2009
1 parent
20766f1
commit 5219700
Showing
12 changed files
with
96 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<% if page.page_plugins.any? -%> | ||
<% page.page_plugins.each_with_index do |plugin, i| -%> | ||
<%# render :partial => plugin.module_class.view_partial, :locals => { :plugin_module => plugin.module } -%> | ||
<div class='page-plugin page-plugin-<%= i -%>'> | ||
<%= render :partial => plugin.module.view_partial, :locals => { :plugin_module => plugin.module } -%> | ||
<% if logged_in? && get_setting('show_inline_edit_links') %> | ||
<div class='clear'></div> | ||
<% if current_user.can_author_content? %> | ||
<%= link_to "[Edit]", edit_admin_page_path(:id => page.id, :anchor => "page-plugin-#{plugin.id}") %> | ||
<% elsif current_user.can_approve_content? %> | ||
<%= link_to "[Manage Content]", edit_admin_page_path(:id => page.id, :anchor => "page-plugin-#{plugin.id}") %> | ||
<div class='page <%= page.permalinkable_title %>'> | ||
<% if page.page_plugins.any? -%> | ||
<% page.page_plugins.each_with_index do |plugin, i| -%> | ||
<%# render :partial => plugin.module_class.view_partial, :locals => { :plugin_module => plugin.module } -%> | ||
<div class='page-plugin page-plugin-<%= i -%>'> | ||
<%= render :partial => plugin.module.view_partial, :locals => { :plugin_module => plugin.module } -%> | ||
<% if logged_in? && get_setting('show_inline_edit_links') %> | ||
<div class='clear'></div> | ||
<% if current_user.can_author_content? %> | ||
<%= link_to "[Edit]", edit_admin_page_path(:id => page.id, :anchor => "page-plugin-#{plugin.id}") %> | ||
<% elsif current_user.can_approve_content? %> | ||
<%= link_to "[Manage Content]", edit_admin_page_path(:id => page.id, :anchor => "page-plugin-#{plugin.id}") %> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% end -%> | ||
<% 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
17 changes: 17 additions & 0 deletions
17
vendor/plugins/ansuz_form_builder/app/controllers/admin/form_responses_controller.rb
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,17 @@ | ||
class Admin::FormResponsesController < Admin::BaseController | ||
before_filter :load_form_builder | ||
before_filter :load_form_responses | ||
|
||
protected | ||
def load_form_builder | ||
@form_builder = Ansuz::JAdams::FormBuilder.find(params[:form_builder_id]) | ||
end | ||
|
||
def load_form_responses | ||
@form_responses = @form_builder.form_builder_responses | ||
end | ||
|
||
public | ||
def index | ||
end | ||
end |
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
26 changes: 26 additions & 0 deletions
26
vendor/plugins/ansuz_form_builder/app/views/admin/form_responses/index.html.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<%= title "Form Responses" %> | ||
<% content_for :sidebar do %> | ||
<%= link_to "Form Builder", admin_form_builder_path(@form_builder), :class => "icon button back" %> | ||
<% end %> | ||
|
||
<table class='subdued'> | ||
<thead> | ||
<tr> | ||
<% @form_builder.form_fields.each do |form_field| %> | ||
<th><%= form_field.label %></th> | ||
<% end %> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @form_responses.each do |form_response| %> | ||
<tr> | ||
<% @form_builder.form_fields.each do |form_field| %> | ||
<td> | ||
<%= form_field_response_for(form_field, form_response) %> | ||
</td> | ||
<% end %> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> |
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