Adding basic Deliverable controller and index page. #1135
This commit is contained in:
18
app/controllers/deliverables_controller.rb
Normal file
18
app/controllers/deliverables_controller.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class DeliverablesController < ApplicationController
|
||||
unloadable
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize, :get_settings
|
||||
|
||||
def index
|
||||
@deliverables = Deliverable.find(:all)
|
||||
end
|
||||
|
||||
private
|
||||
def find_project
|
||||
@project = Project.find(params[:id])
|
||||
end
|
||||
|
||||
def get_settings
|
||||
# @settings = Setting.plugin_budget_plugin
|
||||
end
|
||||
end
|
||||
1
app/views/deliverables/index.html.erb
Normal file
1
app/views/deliverables/index.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Deliverables</h1>
|
||||
7
init.rb
7
init.rb
@@ -7,4 +7,11 @@ Redmine::Plugin.register :budget_plugin do
|
||||
author 'Eric Davis <edavis@littlestreamsoftware.com>'
|
||||
description 'This is a budget plugin to track deliverables and budgets on a project'
|
||||
version '0.0.0'
|
||||
|
||||
project_module :budget_module do
|
||||
permission :view_budget, { :deliverables => [:index]}
|
||||
permission :manage_budget, { :deliverables => [:new, :edit, :create, :update, :destroy]}
|
||||
end
|
||||
|
||||
menu :project_menu, :budget, :controller => "deliverables", :action => 'index'
|
||||
end
|
||||
|
||||
10
spec/controllers/deliverables_controller_spec.rb
Normal file
10
spec/controllers/deliverables_controller_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
|
||||
describe DeliverablesController do
|
||||
|
||||
#Delete this example and add some real ones
|
||||
it "should use DeliverablesController" do
|
||||
controller.should be_an_instance_of(DeliverablesController)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user