Skip to content

Commit bab37f9

Browse files
rainlabsrain
authored and
rain
committed
add new default theme and some plugins
1 parent 6ac8507 commit bab37f9

File tree

97 files changed

+3969
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+3969
-11
lines changed

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.loadpath
33
/.powrc
44
/.rvmrc
5+
/.idea
56
/config/additional_environment.rb
67
/config/configuration.yml
78
/config/database.yml
@@ -17,14 +18,14 @@
1718
/lib/redmine/scm/adapters/mercurial/redminehelper.pyo
1819
/log/*.log*
1920
/log/mongrel_debug
20-
/plugins/*
21+
#/plugins/*
2122
!/plugins/README
2223
/public/dispatch.*
2324
/public/plugin_assets
24-
/public/themes/*
25-
!/public/themes/alternate
26-
!/public/themes/classic
27-
!/public/themes/README
25+
#/public/themes/*
26+
#!/public/themes/alternate
27+
#!/public/themes/classic
28+
#!/public/themes/README
2829
/tmp/*
2930
/tmp/cache/*
3031
/tmp/pdf/*

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ gem "builder", ">= 3.0.4"
88
gem "request_store", "1.0.5"
99
gem "mime-types"
1010
gem "rbpdf", "~> 1.18.1"
11+
gem "awesome_nested_set", "2.1.6"
12+
gem "unicorn"
1113

1214
# Optional gem for LDAP authentication
1315
group :ldap do

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Redmine with plugins and themes
2+
Redmine contains:
3+
4+
* Theme a1 as default: http://redminecrm.com/pages/a1*theme
5+
* Plugin redmine_people: http://www.redminecrm.com/projects/people/pages/1
6+
* Plugin redmine_helpdesk: https://github.com/jfqd/redmine_helpdesk
7+
* Plugin redmine_better_gantt_chart: https://github.com/kulesa/redmine_better_gantt_chart
8+
* Plugin scrum2b: https://github.com/scrum2b/scrum2b
9+
# INSTALL
10+
For install project enter following command:
11+
12+
$ bundle
13+
$ rake RAILS_ENV=production db:migrate
14+
$ rake redmine:plugins:migrate RAILS_ENV=production
15+
$ rake generate_secret_token
16+
$ RAILS_ENV=production REDMINE_LANG=ru rake redmine:load_default_data

README.rdoc

Lines changed: 0 additions & 5 deletions
This file was deleted.

config/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ repository_log_display_limit:
201201
format: int
202202
default: 100
203203
ui_theme:
204-
default: ''
204+
default: 'a1'
205205
emails_footer:
206206
default: |-
207207
You have received this notification because you have either subscribed to it, or are involved in it.

plugins/redmine_better_gantt_chart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit f20459990fa7f0223cf103fecbc2c590d2dd3a7a

plugins/redmine_helpdesk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 988ecbf861962bc28695be0d2a95d0e0a6ad9a26

plugins/redmine_people/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source :rubygems
2+
gem "vpim", "~> 0.695"

plugins/redmine_people/README.rdoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
= redmine_people
2+
3+
Description goes here
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
class DepartmentsController < ApplicationController
2+
unloadable
3+
4+
before_filter :find_department, :except => [:index, :create, :new]
5+
before_filter :require_admin, :only => [:destroy, :new, :create]
6+
before_filter :authorize_people, :only => [:update, :edit, :add_people, :remove_person]
7+
8+
helper :attachments
9+
10+
def index
11+
@departments = Department.all
12+
end
13+
14+
def edit
15+
end
16+
17+
def new
18+
@department = Department.new
19+
end
20+
21+
def show
22+
end
23+
24+
def update
25+
@department.safe_attributes = params[:department]
26+
27+
if @department.save
28+
respond_to do |format|
29+
format.html { redirect_to :action => "show", :id => @department }
30+
format.api { head :ok }
31+
end
32+
else
33+
respond_to do |format|
34+
format.html { render :action => 'edit' }
35+
format.api { render_validation_errors(@department) }
36+
end
37+
end
38+
end
39+
40+
def destroy
41+
if @department.destroy
42+
flash[:notice] = l(:notice_successful_delete)
43+
respond_to do |format|
44+
format.html { redirect_to :controller => "people_settings", :action => "index", :tab => "departments" }
45+
format.api { render_api_ok }
46+
end
47+
else
48+
flash[:error] = l(:notice_unsuccessful_save)
49+
end
50+
51+
end
52+
53+
def create
54+
@department = Department.new
55+
@department.safe_attributes = params[:department]
56+
57+
if @department.save
58+
respond_to do |format|
59+
format.html { redirect_to :action => "show", :id => @department }
60+
# format.html { redirect_to :controller => "people_settings", :action => "index", :tab => "departments" }
61+
format.api { head :ok }
62+
end
63+
else
64+
respond_to do |format|
65+
format.html { render :action => 'new' }
66+
format.api { render_validation_errors(@department) }
67+
end
68+
end
69+
end
70+
71+
def add_people
72+
@people = Person.find_all_by_id(params[:person_id] || params[:person_ids])
73+
@department.people << @people if request.post?
74+
respond_to do |format|
75+
format.html { redirect_to :controller => 'departments', :action => 'edit', :id => @department, :tab => 'people' }
76+
format.js
77+
format.api { render_api_ok }
78+
end
79+
end
80+
81+
def remove_person
82+
@department.people.delete(Person.find(params[:person_id])) if request.delete?
83+
respond_to do |format|
84+
format.html { redirect_to :controller => 'departments', :action => 'edit', :id => @department, :tab => 'people' }
85+
format.js
86+
format.api { render_api_ok }
87+
end
88+
end
89+
90+
91+
def autocomplete_for_person
92+
@people = Person.active.where(:type => 'User').not_in_department(@department).like(params[:q]).all(:limit => 100)
93+
render :layout => false
94+
end
95+
96+
private
97+
def find_department
98+
@department = Department.find(params[:id])
99+
rescue ActiveRecord::RecordNotFound
100+
render_404
101+
end
102+
103+
def authorize_people
104+
allowed = case params[:action].to_s
105+
when "create", "new"
106+
User.current.allowed_people_to?(:add_departments, @person)
107+
when "update", "edit", "add_people", "remove_person"
108+
User.current.allowed_people_to?(:edit_departments, @person)
109+
when "delete"
110+
User.current.allowed_people_to?(:delete_departments, @person)
111+
when "index", "show"
112+
User.current.allowed_people_to?(:view_departments, @person)
113+
else
114+
false
115+
end
116+
117+
if allowed
118+
true
119+
else
120+
deny_access
121+
end
122+
end
123+
124+
end

0 commit comments

Comments
 (0)