Adding basic Deliverable controller and index page. #1135
This commit is contained in:
1 parent
439a649b40
commit
15cc2c992d
4 files changed
+36
No files matched your search
@@ -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
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<h1>Deliverables</h1>
|
||||||
@@ -7,4 +7,11 @@ Redmine::Plugin.register :budget_plugin do
|
|||||||
author 'Eric Davis <edavis@littlestreamsoftware.com>'
|
author 'Eric Davis <edavis@littlestreamsoftware.com>'
|
||||||
description 'This is a budget plugin to track deliverables and budgets on a project'
|
description 'This is a budget plugin to track deliverables and budgets on a project'
|
||||||
version '0.0.0'
|
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
|
end
|
||||||
@@ -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