Skip to content

Commit

Permalink
Merge branch 'master' of github.com:concerto/concerto
Browse files Browse the repository at this point in the history
  • Loading branch information
zr2d2 committed Jul 9, 2012
2 parents b6247c0 + f1b0469 commit 86f3de7
Show file tree
Hide file tree
Showing 26 changed files with 282 additions and 293 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Place all the styles related to the plugins controller here.
// Place all the styles related to the ConcertoPlugins controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
83 changes: 83 additions & 0 deletions app/controllers/concerto_plugins_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
class ConcertoPluginsController < ApplicationController
# GET /concerto_plugins
# GET /concerto_plugins.json
def index
@concerto_plugins = ConcertoPlugin.all

respond_to do |format|
format.html # index.html.erb
format.json { render json: @concerto_plugins }
end
end

# GET /concerto_plugins/1
# GET /concerto_plugins/1.json
def show
@concerto_plugin = ConcertoPlugin.find(params[:id])

respond_to do |format|
format.html # show.html.erb
format.json { render json: @concerto_plugin }
end
end

# GET /concerto_plugins/new
# GET /concerto_plugins/new.json
def new
@concerto_plugin = ConcertoPlugin.new

respond_to do |format|
format.html # new.html.erb
format.json { render json: @concerto_plugin }
end
end

# GET /concerto_plugins/1/edit
def edit
@concerto_plugin = ConcertoPlugin.find(params[:id])
end

# POST /concerto_plugins
# POST /concerto_plugins.json
def create
@concerto_plugin = ConcertoPlugin.new(params[:concerto_plugin])

respond_to do |format|
if @concerto_plugin.save
format.html { redirect_to @concerto_plugin, notice: 'Concerto plugin was successfully created.' }
format.json { render json: @concerto_plugin, status: :created, location: @concerto_plugin }
else
format.html { render action: "new" }
format.json { render json: @concerto_plugin.errors, status: :unprocessable_entity }
end
end
end

# PUT /concerto_plugins/1
# PUT /concerto_plugins/1.json
def update
@concerto_plugin = ConcertoPlugin.find(params[:id])

respond_to do |format|
if @concerto_plugin.update_attributes(params[:concerto_plugin])
format.html { redirect_to @concerto_plugin, notice: 'Concerto plugin was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @concerto_plugin.errors, status: :unprocessable_entity }
end
end
end

# DELETE /concerto_plugins/1
# DELETE /concerto_plugins/1.json
def destroy
@concerto_plugin = ConcertoPlugin.find(params[:id])
@concerto_plugin.destroy

respond_to do |format|
format.html { redirect_to concerto_plugins_url }
format.json { head :no_content }
end
end
end
83 changes: 0 additions & 83 deletions app/controllers/plugins_controller.rb

This file was deleted.

9 changes: 5 additions & 4 deletions app/controllers/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ def get_feed

def index
@can_moderate_feed = can?(:update, @feed)
@submissions = @feed.submissions
if !@can_moderate_feed
@submissions = @submissions.approved
@approved_submissions = @feed.submissions.approved
if @can_moderate_feed
@pending_submissions = @feed.submissions.pending
end
auth!
#brzNote: did appears to result in a redirect when it is uncommented:
#auth!

respond_to do |format|
format.js { }
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/concerto_plugins_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ConcertoPluginsHelper
end
2 changes: 0 additions & 2 deletions app/helpers/plugins_helper.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/models/plugin.rb → app/models/concerto_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Plugin < ActiveRecord::Base
class ConcertoPlugin < ActiveRecord::Base
attr_accessible :enabled, :gem_name, :gem_version, :installed, :module_name, :name, :source, :source_url
end
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<%= form_for(@plugin) do |f| %>
<% if @plugin.errors.any? %>
<%= form_for(@concerto_plugin) do |f| %>
<% if @concerto_plugin.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@plugin.errors.count, "error") %> prohibited this plugin from being saved:</h2>
<h2><%= pluralize(@concerto_plugin.errors.count, "error") %> prohibited this concerto_plugin from being saved:</h2>

<ul>
<% @plugin.errors.full_messages.each do |msg| %>
<% @concerto_plugin.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
Expand Down
6 changes: 6 additions & 0 deletions app/views/concerto_plugins/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<h1>Editing concerto_plugin</h1>

<%= render 'form' %>
<%= link_to 'Show', @concerto_plugin %> |
<%= link_to 'Back', concerto_plugins_path %>
37 changes: 37 additions & 0 deletions app/views/concerto_plugins/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<h1>Listing concerto_plugins</h1>

<table>
<tr>
<th>Name</th>
<th>Module name</th>
<th>Enabled</th>
<th>Gem name</th>
<th>Gem version</th>
<th>Source</th>
<th>Source url</th>
<th>Installed</th>
<th></th>
<th></th>
<th></th>
</tr>

<% @concerto_plugins.each do |concerto_plugin| %>
<tr>
<td><%= concerto_plugin.name %></td>
<td><%= concerto_plugin.module_name %></td>
<td><%= concerto_plugin.enabled %></td>
<td><%= concerto_plugin.gem_name %></td>
<td><%= concerto_plugin.gem_version %></td>
<td><%= concerto_plugin.source %></td>
<td><%= concerto_plugin.source_url %></td>
<td><%= concerto_plugin.installed %></td>
<td><%= link_to 'Show', concerto_plugin %></td>
<td><%= link_to 'Edit', edit_concerto_plugin_path(concerto_plugin) %></td>
<td><%= link_to 'Destroy', concerto_plugin, confirm: 'Are you sure?', method: :delete %></td>
</tr>
<% end %>
</table>

<br />

<%= link_to 'New Concerto plugin', new_concerto_plugin_path %>
5 changes: 5 additions & 0 deletions app/views/concerto_plugins/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1>New concerto_plugin</h1>

<%= render 'form' %>
<%= link_to 'Back', concerto_plugins_path %>
45 changes: 45 additions & 0 deletions app/views/concerto_plugins/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<p id="notice"><%= notice %></p>

<p>
<b>Name:</b>
<%= @concerto_plugin.name %>
</p>

<p>
<b>Module name:</b>
<%= @concerto_plugin.module_name %>
</p>

<p>
<b>Enabled:</b>
<%= @concerto_plugin.enabled %>
</p>

<p>
<b>Gem name:</b>
<%= @concerto_plugin.gem_name %>
</p>

<p>
<b>Gem version:</b>
<%= @concerto_plugin.gem_version %>
</p>

<p>
<b>Source:</b>
<%= @concerto_plugin.source %>
</p>

<p>
<b>Source url:</b>
<%= @concerto_plugin.source_url %>
</p>

<p>
<b>Installed:</b>
<%= @concerto_plugin.installed %>
</p>


<%= link_to 'Edit', edit_concerto_plugin_path(@concerto_plugin) %> |
<%= link_to 'Back', concerto_plugins_path %>
6 changes: 0 additions & 6 deletions app/views/plugins/edit.html.erb

This file was deleted.

37 changes: 0 additions & 37 deletions app/views/plugins/index.html.erb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/plugins/new.html.erb

This file was deleted.

0 comments on commit 86f3de7

Please sign in to comment.