-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
310e8e0
commit 3ddfb03
Showing
14 changed files
with
201 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | ||
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | ||
load 'config/deploy' |
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,10 @@ | ||
class ReportsController < ApplicationController | ||
|
||
def index | ||
@periods = Period.all(:limit=>20) | ||
@units = Unit.all(:limit=>20) | ||
@projects = Project.all(:limit=>20) | ||
@journal_types = JournalType.all(:limit=>20) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module ReportsHelper | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Report < ActiveRecord::Base | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<h1> | ||
<%= t(:title_plural, :scope=>:reports) %> | ||
</h1> | ||
|
||
<div class="form_header"> | ||
|
||
<table> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<%= t(:from_period, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= select_tag :from_period_id, | ||
options_from_collection_for_select(@periods, "id", "to_s") %> | ||
</td> | ||
<td> | ||
<%= t(:to_period, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= select_tag :to_period_id, | ||
options_from_collection_for_select(@periods, "id", "to_s") %> | ||
</td> | ||
<td> | ||
<%= t(:result_from_period, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= select_tag :result_from_period_id, | ||
options_from_collection_for_select(@periods, "id", "to_s") %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<%= t(:unit, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= select_tag :unit_id, | ||
options_from_collection_for_select(@units, "id", "to_s") %> | ||
</td> | ||
<td> | ||
<%= t(:project, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= select_tag :project_id, | ||
options_from_collection_for_select(@projects, "id", "to_s") %> | ||
</td> | ||
<td> | ||
<%= t(:journal_type, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= select_tag :journal_type_id, | ||
options_from_collection_for_select(@journal_types, "id", "to_s") %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<%= t(:show_only_active_accounts, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= check_box_tag :show_only_active_accounts %> | ||
</td> | ||
<td> | ||
<%= t(:last_year_figures, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= check_box_tag :last_year_figures %> | ||
</td> | ||
<td> | ||
<%= t(:budget, :scope=>:reports) %> | ||
</td> | ||
<td> | ||
<%= check_box_tag :budget %> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
set :application, "lodo" | ||
set :use_sudo, false | ||
|
||
set :ssh_options, { :forward_agent => true } | ||
|
||
set :scm, :git | ||
set :git_shallow_clone, 1 | ||
|
||
|
||
desc "Deploying to production: cap dev deploy:migrations" | ||
task :dev do | ||
set :repository, "ssh://[email protected]/var/gits/lodo_n.git" | ||
set :deploy_to, "/var/www/lodo_dev/" | ||
set :branch, "working" | ||
role :app, "dev.dodo.lodo.no" | ||
role :web, "dev.dodo.lodo.no" | ||
role :db, "dev.dodo.lodo.no", :primary => true | ||
|
||
end | ||
|
||
desc "Deploying to staging server: cap staging deploy:migrations" | ||
task :staging do | ||
set :deploy_to, "/var/www/lodo_staging/" | ||
role :app, "dev.dodo.lodo.no" | ||
role :web, "dev.dodo.lodo.no" | ||
role :db, "dev.dodo.lodo.no", :primary => true | ||
end | ||
|
||
#after("deploy:update_code") do | ||
# run "/bin/chown -R www-data:www-data #{deploy_to}" | ||
#end | ||
|
||
namespace :deploy do | ||
desc "Restart application" | ||
task :restart, :roles => :app do | ||
run "touch #{current_path}/tmp/restart.txt" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class CreateReports < ActiveRecord::Migration | ||
def self.up | ||
create_table :reports do |t| | ||
|
||
t.timestamps | ||
end | ||
end | ||
|
||
def self.down | ||
drop_table :reports | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
|
||
# This model initially had no columns defined. If you add columns to the | ||
# model remove the '{}' from the fixture names and add the columns immediately | ||
# below each fixture, per the syntax in the comments below | ||
# | ||
one: {} | ||
# column: value | ||
# | ||
two: {} | ||
# column: value |
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,8 @@ | ||
require 'test_helper' | ||
|
||
class ReportsControllerTest < ActionController::TestCase | ||
# Replace this with your real tests. | ||
test "the truth" do | ||
assert true | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require 'test_helper' | ||
|
||
class ReportsHelperTest < ActionView::TestCase | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'test_helper' | ||
|
||
class ReportTest < ActiveSupport::TestCase | ||
# Replace this with your real tests. | ||
test "the truth" do | ||
assert true | ||
end | ||
end |