@@ -0,0 +1,3 | |||
|
1 | <p><%= link_to h(document.title), :controller => 'documents', :action => 'show', :id => document %><br /> | |
|
2 | <% unless document.description.empty? %><%=h truncate document.description, 250 %><br /><% end %> | |
|
3 | <em><%= format_time(document.created_on) %></em></p> No newline at end of file |
@@ -0,0 +1,4 | |||
|
1 | <p><%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %><br /> | |
|
2 | <% unless news.summary.empty? %><%=h news.summary %><br /><% end %> | |
|
3 | <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br /> | |
|
4 | <%= news.comments_count %> <%= lwr(:label_comment, news.comments_count).downcase %><br /></p> |
@@ -1,74 +1,74 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | module IssuesHelper |
|
19 | 19 | |
|
20 | 20 | def show_detail(detail, no_html=false) |
|
21 | 21 | case detail.property |
|
22 | 22 | when 'attr' |
|
23 | 23 | label = l(("field_" + detail.prop_key.to_s.gsub(/\_id$/, "")).to_sym) |
|
24 | 24 | case detail.prop_key |
|
25 | 25 | when 'due_date', 'start_date' |
|
26 | 26 | value = format_date(detail.value.to_date) if detail.value |
|
27 | 27 | old_value = format_date(detail.old_value.to_date) if detail.old_value |
|
28 | 28 | when 'status_id' |
|
29 | 29 | s = IssueStatus.find_by_id(detail.value) and value = s.name if detail.value |
|
30 | 30 | s = IssueStatus.find_by_id(detail.old_value) and old_value = s.name if detail.old_value |
|
31 | 31 | when 'assigned_to_id' |
|
32 | 32 | u = User.find_by_id(detail.value) and value = u.name if detail.value |
|
33 | 33 | u = User.find_by_id(detail.old_value) and old_value = u.name if detail.old_value |
|
34 | 34 | when 'priority_id' |
|
35 | 35 | e = Enumeration.find_by_id(detail.value) and value = e.name if detail.value |
|
36 | 36 | e = Enumeration.find_by_id(detail.old_value) and old_value = e.name if detail.old_value |
|
37 | 37 | when 'category_id' |
|
38 | 38 | c = IssueCategory.find_by_id(detail.value) and value = c.name if detail.value |
|
39 | 39 | c = IssueCategory.find_by_id(detail.old_value) and old_value = c.name if detail.old_value |
|
40 | 40 | when 'fixed_version_id' |
|
41 | 41 | v = Version.find_by_id(detail.value) and value = v.name if detail.value |
|
42 | 42 | v = Version.find_by_id(detail.old_value) and old_value = v.name if detail.old_value |
|
43 | 43 | end |
|
44 | 44 | when 'cf' |
|
45 | 45 | custom_field = CustomField.find_by_id(detail.prop_key) |
|
46 | 46 | if custom_field |
|
47 | 47 | label = custom_field.name |
|
48 | 48 | value = format_value(detail.value, custom_field.field_format) if detail.value |
|
49 | 49 | old_value = format_value(detail.old_value, custom_field.field_format) if detail.old_value |
|
50 | 50 | end |
|
51 | 51 | end |
|
52 | 52 | |
|
53 | 53 | label ||= detail.prop_key |
|
54 | 54 | value ||= detail.value |
|
55 | 55 | old_value ||= detail.old_value |
|
56 | 56 | |
|
57 | 57 | unless no_html |
|
58 | 58 | label = content_tag('strong', label) |
|
59 | old_value = content_tag("i", old_value) if old_value | |
|
60 | old_value = content_tag("strike", old_value) if old_value and !value | |
|
61 | value = content_tag("i", value) if value | |
|
59 | old_value = content_tag("i", h(old_value)) if old_value | |
|
60 | old_value = content_tag("strike", h(old_value)) if old_value and !value | |
|
61 | value = content_tag("i", h(value)) if value | |
|
62 | 62 | end |
|
63 | 63 | |
|
64 | 64 | if value |
|
65 | 65 | if old_value |
|
66 | 66 | label + " " + l(:text_journal_changed, old_value, value) |
|
67 | 67 | else |
|
68 | 68 | label + " " + l(:text_journal_set_to, value) |
|
69 | 69 | end |
|
70 | 70 | else |
|
71 | 71 | label + " " + l(:text_journal_deleted) + " (#{old_value})" |
|
72 | 72 | end |
|
73 | 73 | end |
|
74 | 74 | end |
@@ -1,42 +1,43 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class CustomField < ActiveRecord::Base |
|
19 | 19 | has_many :custom_values, :dependent => true |
|
20 | 20 | |
|
21 | 21 | FIELD_FORMATS = { "list" => :label_list, |
|
22 | 22 | "date" => :label_date, |
|
23 | 23 | "bool" => :label_boolean, |
|
24 | 24 | "int" => :label_integer, |
|
25 | 25 | "string" => :label_string, |
|
26 | 26 | "text" => :label_text |
|
27 | 27 | }.freeze |
|
28 | 28 | |
|
29 | 29 | validates_presence_of :name, :field_format |
|
30 | 30 | validates_uniqueness_of :name |
|
31 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
|
31 | 32 | validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys |
|
32 | 33 | validates_presence_of :possible_values, :if => Proc.new { |field| field.field_format == "list" } |
|
33 | 34 | |
|
34 | 35 | # to move in project_custom_field |
|
35 | 36 | def self.for_all |
|
36 | 37 | find(:all, :conditions => ["is_for_all=?", true]) |
|
37 | 38 | end |
|
38 | 39 | |
|
39 | 40 | def type_name |
|
40 | 41 | nil |
|
41 | 42 | end |
|
42 | 43 | end |
@@ -1,46 +1,47 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Enumeration < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | |
|
21 |
|
|
|
22 |
|
|
|
21 | validates_presence_of :opt, :name | |
|
22 | validates_uniqueness_of :name, :scope => [:opt] | |
|
23 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
|
23 | 24 | |
|
24 | 25 | OPTIONS = { |
|
25 | 26 | "IPRI" => :enumeration_issue_priorities, |
|
26 | 27 | "DCAT" => :enumeration_doc_categories |
|
27 | 28 | }.freeze |
|
28 | 29 | |
|
29 | 30 | def self.get_values(option) |
|
30 | 31 | find(:all, :conditions => ['opt=?', option]) |
|
31 | 32 | end |
|
32 | 33 | |
|
33 | 34 | def option_name |
|
34 | 35 | OPTIONS[self.opt] |
|
35 | 36 | end |
|
36 | 37 | |
|
37 | 38 | private |
|
38 | 39 | def check_integrity |
|
39 | 40 | case self.opt |
|
40 | 41 | when "IPRI" |
|
41 | 42 | raise "Can't delete enumeration" if Issue.find(:first, :conditions => ["priority_id=?", self.id]) |
|
42 | 43 | when "DCAT" |
|
43 | 44 | raise "Can't delete enumeration" if Document.find(:first, :conditions => ["category_id=?", self.id]) |
|
44 | 45 | end |
|
45 | 46 | end |
|
46 | 47 | end |
@@ -1,49 +1,50 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class IssueStatus < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | has_many :workflows, :foreign_key => "old_status_id" |
|
21 | 21 | |
|
22 | 22 | validates_presence_of :name |
|
23 | 23 | validates_uniqueness_of :name |
|
24 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
|
24 | 25 | validates_length_of :html_color, :is => 6 |
|
25 | 26 | validates_format_of :html_color, :with => /^[a-f0-9]*$/i |
|
26 | 27 | |
|
27 | 28 | def before_save |
|
28 | 29 | IssueStatus.update_all "is_default=false" if self.is_default? |
|
29 | 30 | end |
|
30 | 31 | |
|
31 | 32 | # Returns the default status for new issues |
|
32 | 33 | def self.default |
|
33 | 34 | find(:first, :conditions =>["is_default=?", true]) |
|
34 | 35 | end |
|
35 | 36 | |
|
36 | 37 | # Returns an array of all statuses the given role can switch to |
|
37 | 38 | def new_statuses_allowed_to(role, tracker) |
|
38 | 39 | statuses = [] |
|
39 | 40 | for workflow in self.workflows |
|
40 | 41 | statuses << workflow.new_status if workflow.role_id == role.id and workflow.tracker_id == tracker.id |
|
41 | 42 | end unless role.nil? or tracker.nil? |
|
42 | 43 | statuses |
|
43 | 44 | end |
|
44 | 45 | |
|
45 | 46 | private |
|
46 | 47 | def check_integrity |
|
47 | 48 | raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id]) |
|
48 | 49 | end |
|
49 | 50 | end |
@@ -1,58 +1,59 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Project < ActiveRecord::Base |
|
19 | 19 | has_many :versions, :dependent => true, :order => "versions.effective_date DESC, versions.name DESC" |
|
20 | 20 | has_many :members, :dependent => true |
|
21 | 21 | has_many :users, :through => :members |
|
22 | 22 | has_many :custom_values, :dependent => true, :as => :customized |
|
23 | 23 | has_many :issues, :dependent => true, :order => "issues.created_on DESC", :include => [:status, :tracker] |
|
24 | 24 | has_many :queries, :dependent => true |
|
25 | 25 | has_many :documents, :dependent => true |
|
26 | 26 | has_many :news, :dependent => true, :include => :author |
|
27 | 27 | has_many :issue_categories, :dependent => true, :order => "issue_categories.name" |
|
28 | 28 | has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => 'custom_fields_projects', :association_foreign_key => 'custom_field_id' |
|
29 | 29 | acts_as_tree :order => "name", :counter_cache => true |
|
30 | 30 | |
|
31 | 31 | validates_presence_of :name, :description |
|
32 | 32 | validates_uniqueness_of :name |
|
33 | 33 | validates_associated :custom_values, :on => :update |
|
34 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
|
34 | 35 | |
|
35 | 36 | # returns 5 last created projects |
|
36 | 37 | def self.latest |
|
37 | 38 | find(:all, :limit => 5, :order => "created_on DESC") |
|
38 | 39 | end |
|
39 | 40 | |
|
40 | 41 | # Returns an array of all custom fields enabled for project issues |
|
41 | 42 | # (explictly associated custom fields and custom fields enabled for all projects) |
|
42 | 43 | def custom_fields_for_issues(tracker) |
|
43 | 44 | tracker.custom_fields.find(:all, :include => :projects, |
|
44 | 45 | :conditions => ["is_for_all=? or project_id=?", true, self.id]) |
|
45 | 46 | #(CustomField.for_all + custom_fields).uniq |
|
46 | 47 | end |
|
47 | 48 | |
|
48 | 49 | def all_custom_fields |
|
49 | 50 | @all_custom_fields ||= IssueCustomField.find(:all, :include => :projects, |
|
50 | 51 | :conditions => ["is_for_all=? or project_id=?", true, self.id]) |
|
51 | 52 | end |
|
52 | 53 | |
|
53 | 54 | protected |
|
54 | 55 | def validate |
|
55 | 56 | errors.add(parent_id, " must be a root project") if parent and parent.parent |
|
56 | 57 | errors.add_to_base("A project with subprojects can't be a subproject") if parent and projects_count > 0 |
|
57 | 58 | end |
|
58 | 59 | end |
@@ -1,31 +1,32 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Role < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | has_and_belongs_to_many :permissions |
|
21 | 21 | has_many :workflows, :dependent => true |
|
22 | 22 | has_many :members |
|
23 | 23 | |
|
24 | 24 | validates_presence_of :name |
|
25 | 25 | validates_uniqueness_of :name |
|
26 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
|
26 | 27 | |
|
27 | 28 | private |
|
28 | 29 | def check_integrity |
|
29 | 30 | raise "Can't delete role" if Member.find(:first, :conditions =>["role_id=?", self.id]) |
|
30 | 31 | end |
|
31 | 32 | end |
@@ -1,31 +1,32 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class Tracker < ActiveRecord::Base |
|
19 | 19 | before_destroy :check_integrity |
|
20 | 20 | has_many :issues |
|
21 | 21 | has_many :workflows, :dependent => true |
|
22 | 22 | has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => 'custom_fields_trackers', :association_foreign_key => 'custom_field_id' |
|
23 | 23 | |
|
24 | 24 | validates_presence_of :name |
|
25 | 25 | validates_uniqueness_of :name |
|
26 | ||
|
26 | validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
|
27 | ||
|
27 | 28 | private |
|
28 | 29 | def check_integrity |
|
29 | 30 | raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id]) |
|
30 | 31 | end |
|
31 | 32 | end |
@@ -1,129 +1,130 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | require "digest/sha1" |
|
19 | 19 | |
|
20 | 20 | class User < ActiveRecord::Base |
|
21 | 21 | has_many :memberships, :class_name => 'Member', :include => [ :project, :role ], :dependent => true |
|
22 | 22 | has_many :projects, :through => :memberships |
|
23 | 23 | has_many :custom_values, :dependent => true, :as => :customized |
|
24 | 24 | has_one :preference, :dependent => true, :class_name => 'UserPreference' |
|
25 | 25 | belongs_to :auth_source |
|
26 | 26 | |
|
27 | 27 | attr_accessor :password, :password_confirmation |
|
28 | 28 | attr_accessor :last_before_login_on |
|
29 | 29 | # Prevents unauthorized assignments |
|
30 | 30 | attr_protected :login, :admin, :password, :password_confirmation, :hashed_password |
|
31 | 31 | |
|
32 | 32 | validates_presence_of :login, :firstname, :lastname, :mail |
|
33 | 33 | validates_uniqueness_of :login, :mail |
|
34 | 34 | # Login must contain lettres, numbers, underscores only |
|
35 |
validates_format_of : |
|
|
35 | validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-]*$/i | |
|
36 | validates_format_of :login, :with => /^[a-z0-9_\-@\.]+$/i | |
|
36 | 37 | validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i |
|
37 | 38 | # Password length between 4 and 12 |
|
38 | 39 | validates_length_of :password, :in => 4..12, :allow_nil => true |
|
39 | 40 | validates_confirmation_of :password, :allow_nil => true |
|
40 | 41 | validates_associated :custom_values, :on => :update |
|
41 | 42 | |
|
42 | 43 | # Account statuses |
|
43 | 44 | STATUS_ACTIVE = 1 |
|
44 | 45 | STATUS_REGISTERED = 2 |
|
45 | 46 | STATUS_LOCKED = 3 |
|
46 | 47 | |
|
47 | 48 | def before_save |
|
48 | 49 | # update hashed_password if password was set |
|
49 | 50 | self.hashed_password = User.hash_password(self.password) if self.password |
|
50 | 51 | end |
|
51 | 52 | |
|
52 | 53 | # Returns the user that matches provided login and password, or nil |
|
53 | 54 | def self.try_to_login(login, password) |
|
54 | 55 | user = find(:first, :conditions => ["login=?", login]) |
|
55 | 56 | if user |
|
56 | 57 | # user is already in local database |
|
57 | 58 | return nil if !user.active? |
|
58 | 59 | if user.auth_source |
|
59 | 60 | # user has an external authentication method |
|
60 | 61 | return nil unless user.auth_source.authenticate(login, password) |
|
61 | 62 | else |
|
62 | 63 | # authentication with local password |
|
63 | 64 | return nil unless User.hash_password(password) == user.hashed_password |
|
64 | 65 | end |
|
65 | 66 | else |
|
66 | 67 | # user is not yet registered, try to authenticate with available sources |
|
67 | 68 | attrs = AuthSource.authenticate(login, password) |
|
68 | 69 | if attrs |
|
69 | 70 | onthefly = new(*attrs) |
|
70 | 71 | onthefly.login = login |
|
71 | 72 | onthefly.language = $RDM_DEFAULT_LANG |
|
72 | 73 | if onthefly.save |
|
73 | 74 | user = find(:first, :conditions => ["login=?", login]) |
|
74 | 75 | logger.info("User '#{user.login}' created on the fly.") if logger |
|
75 | 76 | end |
|
76 | 77 | end |
|
77 | 78 | end |
|
78 | 79 | user.update_attribute(:last_login_on, Time.now) if user |
|
79 | 80 | user |
|
80 | 81 | |
|
81 | 82 | rescue => text |
|
82 | 83 | raise text |
|
83 | 84 | end |
|
84 | 85 | |
|
85 | 86 | # Return user's full name for display |
|
86 | 87 | def display_name |
|
87 | 88 | firstname + " " + lastname |
|
88 | 89 | end |
|
89 | 90 | |
|
90 | 91 | def name |
|
91 | 92 | display_name |
|
92 | 93 | end |
|
93 | 94 | |
|
94 | 95 | def active? |
|
95 | 96 | self.status == STATUS_ACTIVE |
|
96 | 97 | end |
|
97 | 98 | |
|
98 | 99 | def registered? |
|
99 | 100 | self.status == STATUS_REGISTERED |
|
100 | 101 | end |
|
101 | 102 | |
|
102 | 103 | def locked? |
|
103 | 104 | self.status == STATUS_LOCKED |
|
104 | 105 | end |
|
105 | 106 | |
|
106 | 107 | def check_password?(clear_password) |
|
107 | 108 | User.hash_password(clear_password) == self.hashed_password |
|
108 | 109 | end |
|
109 | 110 | |
|
110 | 111 | def role_for_project(project_id) |
|
111 | 112 | @role_for_projects ||= |
|
112 | 113 | begin |
|
113 | 114 | roles = {} |
|
114 | 115 | self.memberships.each { |m| roles.store m.project_id, m.role_id } |
|
115 | 116 | roles |
|
116 | 117 | end |
|
117 | 118 | @role_for_projects[project_id] |
|
118 | 119 | end |
|
119 | 120 | |
|
120 | 121 | def pref |
|
121 | 122 | self.preference ||= UserPreference.new(:user => self) |
|
122 | 123 | end |
|
123 | 124 | |
|
124 | 125 | private |
|
125 | 126 | # Return password digest |
|
126 | 127 | def self.hash_password(clear_password) |
|
127 | 128 | Digest::SHA1.hexdigest(clear_password || "") |
|
128 | 129 | end |
|
129 | 130 | end |
@@ -1,32 +1,32 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'pic picAdd' %> |
|
3 | 3 | </div> |
|
4 | 4 | |
|
5 | 5 | <h2><%=l(:label_project_plural)%></h2> |
|
6 | 6 | |
|
7 | 7 | <table class="listTableContent"> |
|
8 | 8 | <tr class="ListHead"> |
|
9 | 9 | <%= sort_header_tag('name', :caption => l(:label_project)) %> |
|
10 | 10 | <th><%=l(:field_description)%></th> |
|
11 | 11 | <th><%=l(:field_is_public)%></th> |
|
12 | 12 | <th><%=l(:label_subproject_plural)%></th> |
|
13 | 13 | <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> |
|
14 | 14 | <th></th> |
|
15 | 15 | </tr> |
|
16 | 16 | |
|
17 | 17 | <% for project in @projects %> |
|
18 | 18 | <tr class="<%= cycle("odd", "even") %>"> |
|
19 | 19 | <td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %> |
|
20 | <td><%= project.description %> | |
|
20 | <td><%=h project.description %> | |
|
21 | 21 | <td align="center"><%= image_tag 'true' if project.is_public? %> |
|
22 | 22 | <td align="center"><%= project.projects_count %> |
|
23 | 23 | <td align="center"><%= format_date(project.created_on) %> |
|
24 | 24 | <td align="center"> |
|
25 | 25 | <%= button_to l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => "button-small" %> |
|
26 | 26 | </td> |
|
27 | 27 | </tr> |
|
28 | 28 | <% end %> |
|
29 | 29 | </table> |
|
30 | 30 | |
|
31 | 31 | <p><%= pagination_links_full @project_pages %> |
|
32 | 32 | [ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p> No newline at end of file |
@@ -1,11 +1,11 | |||
|
1 | 1 | <% for journal in journals %> |
|
2 | 2 | <h4><%= format_time(journal.created_on) %> - <%= journal.user.name %></h4> |
|
3 | 3 | <ul> |
|
4 | 4 | <% for detail in journal.details %> |
|
5 | 5 | <li><%= show_detail(detail) %></li> |
|
6 | 6 | <% end %> |
|
7 | 7 | </ul> |
|
8 | 8 | <% if journal.notes? %> |
|
9 | <%= simple_format auto_link journal.notes %> | |
|
9 | <%= simple_format auto_link h(journal.notes) %> | |
|
10 | 10 | <% end %> |
|
11 | 11 | <% end %> |
@@ -1,28 +1,28 | |||
|
1 | 1 | <% if issues.length > 0 %> |
|
2 | 2 | <table cellspacing="0" cellpadding="1" width="100%" border="0" class="listTable"> |
|
3 | 3 | <tr><td> |
|
4 | 4 | <table class="listTableContent"> |
|
5 | 5 | <tr class="ListHead"> |
|
6 | 6 | <th>#</th> |
|
7 | 7 | <th><%=l(:field_tracker)%></th> |
|
8 | 8 | <th><%=l(:field_subject)%></th> |
|
9 | 9 | </tr> |
|
10 | 10 | <% for issue in issues %> |
|
11 | 11 | <tr class="<%= cycle("odd", "even") %>"> |
|
12 | 12 | <td align="center" style="font-weight:bold;color:#<%= issue.status.html_color %>;"> |
|
13 | 13 | <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %><br /> |
|
14 | 14 | </td> |
|
15 | 15 | <td><p class="small"><%= issue.project.name %> - <%= issue.tracker.name %><br /> |
|
16 | 16 | <%= issue.status.name %> - <%= format_time(issue.updated_on) %></p></td> |
|
17 | 17 | <td> |
|
18 | <p class="small"><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></p> | |
|
18 | <p class="small"><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></p> | |
|
19 | 19 | </td> |
|
20 | 20 | </tr> |
|
21 | 21 | <% end %> |
|
22 | 22 | </table> |
|
23 | 23 | </td> |
|
24 | 24 | </tr> |
|
25 | 25 | </table> |
|
26 | 26 | <% else %> |
|
27 | 27 | <i><%=l(:label_no_data)%></i> |
|
28 | 28 | <% end %> No newline at end of file |
@@ -1,37 +1,37 | |||
|
1 | <h2><%=l(:label_issue)%> #<%= @issue.id %>: <%= @issue.subject %></h2> | |
|
1 | <h2><%=l(:label_issue)%> #<%= @issue.id %>: <%=h @issue.subject %></h2> | |
|
2 | 2 | |
|
3 | 3 | <%= error_messages_for 'issue' %> |
|
4 | 4 | <%= start_form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") %> |
|
5 | 5 | |
|
6 | 6 | <%= hidden_field_tag 'confirm', 1 %> |
|
7 | 7 | <%= hidden_field_tag 'new_status_id', @new_status.id %> |
|
8 | 8 | |
|
9 | 9 | <div class="box"> |
|
10 | 10 | <p><label><%=l(:label_issue_status_new)%></label> <%= @new_status.name %></p> |
|
11 | 11 | |
|
12 | 12 | <p><label for="issue_assigned_to_id"><%=l(:field_assigned_to)%></label> |
|
13 | 13 | <select name="issue[assigned_to_id]"> |
|
14 | 14 | <option value=""></option> |
|
15 | 15 | <%= options_from_collection_for_select @assignable_to, "id", "display_name", @issue.assigned_to_id %></p> |
|
16 | 16 | </select></p> |
|
17 | 17 | |
|
18 | 18 | |
|
19 | 19 | <p><label for="issue_done_ratio"><%=l(:field_done_ratio)%></label> |
|
20 | 20 | <%= select("issue", "done_ratio", ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) ) %> |
|
21 | 21 | </select></p> |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | <p><label for="issue_fixed_version"><%=l(:field_fixed_version)%></label> |
|
25 | 25 | <select name="issue[fixed_version_id]"> |
|
26 | 26 | <option value="">--none--</option> |
|
27 | 27 | <%= options_from_collection_for_select @issue.project.versions, "id", "name", @issue.fixed_version_id %> |
|
28 | 28 | </select></p> |
|
29 | 29 | |
|
30 | 30 | <p><label for="notes"><%= l(:field_notes) %></label> |
|
31 | 31 | <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10 %></p> |
|
32 | 32 | |
|
33 | 33 | </div> |
|
34 | 34 | |
|
35 | 35 | <%= hidden_field 'issue', 'lock_version' %> |
|
36 | 36 | <%= submit_tag l(:button_save) %> |
|
37 | 37 | <%= end_form_tag %> |
@@ -1,113 +1,113 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'pic picPdf' %> |
|
3 | 3 | </div> |
|
4 | 4 | |
|
5 | <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2> | |
|
5 | <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2> | |
|
6 | 6 | |
|
7 | 7 | <div class="box"> |
|
8 | 8 | <table width="100%"> |
|
9 | 9 | <tr> |
|
10 | 10 | <td width="15%"><b><%=l(:field_status)%> :</b></td><td width="35%"><%= @issue.status.name %></td> |
|
11 | 11 | <td width="15%"><b><%=l(:field_priority)%> :</b></td><td width="35%"><%= @issue.priority.name %></td> |
|
12 | 12 | </tr> |
|
13 | 13 | <tr> |
|
14 | 14 | <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td> |
|
15 | <td><b><%=l(:field_category)%> :</b></td><td><%= @issue.category ? @issue.category.name : "-" %></td> | |
|
15 | <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td> | |
|
16 | 16 | </tr> |
|
17 | 17 | <tr> |
|
18 | 18 | <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td> |
|
19 | 19 | <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td> |
|
20 | 20 | </tr> |
|
21 | 21 | <tr> |
|
22 | 22 | <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td> |
|
23 | 23 | <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td> |
|
24 | 24 | </tr> |
|
25 | 25 | <tr> |
|
26 | 26 | <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td> |
|
27 | 27 | <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td> |
|
28 | 28 | </tr> |
|
29 | 29 | <tr> |
|
30 | 30 | <% n = 0 |
|
31 | 31 | for custom_value in @custom_values %> |
|
32 | <td><b><%= custom_value.custom_field.name %> :</b></td><td><%= show_value custom_value %></td> | |
|
32 | <td><b><%= custom_value.custom_field.name %> :</b></td><td><%=h show_value custom_value %></td> | |
|
33 | 33 | <% n = n + 1 |
|
34 | 34 | if (n > 1) |
|
35 | 35 | n = 0 %> |
|
36 | 36 | </tr><tr> |
|
37 | 37 | <%end |
|
38 | 38 | end %> |
|
39 | 39 | </tr> |
|
40 | 40 | </table> |
|
41 | 41 | <hr /> |
|
42 | 42 | <br /> |
|
43 | 43 | |
|
44 | 44 | <b><%=l(:field_description)%> :</b><br /><br /> |
|
45 | 45 | <%= textilizable @issue.description %> |
|
46 | 46 | <br /> |
|
47 | 47 | |
|
48 | 48 | <div class="contextual"> |
|
49 | 49 | <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'pic picEdit' %> |
|
50 | 50 | <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'pic picMove' %> |
|
51 | 51 | <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> |
|
52 | 52 | </div> |
|
53 | 53 | |
|
54 | 54 | <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %> |
|
55 | 55 | <%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %> |
|
56 | 56 | <%=l(:label_change_status)%> : |
|
57 | 57 | <select name="new_status_id"> |
|
58 | 58 | <%= options_from_collection_for_select @status_options, "id", "name" %> |
|
59 | 59 | </select> |
|
60 | 60 | <%= submit_tag l(:button_change) %> |
|
61 | 61 | <%= end_form_tag %> |
|
62 | 62 | <% end %> |
|
63 | 63 | |
|
64 | 64 | </div> |
|
65 | 65 | |
|
66 | 66 | <div id="history" class="box"> |
|
67 | 67 | <h3><%=l(:label_history)%> |
|
68 | 68 | <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3> |
|
69 | 69 | <%= render :partial => 'history', :locals => { :journals => @journals } %> |
|
70 | 70 | <% if @journals_count > @journals.length %> |
|
71 | 71 | <p><center><small>[ <%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %> ]</small></center></p> |
|
72 | 72 | <% end %> |
|
73 | 73 | </div> |
|
74 | 74 | |
|
75 | 75 | <div class="box"> |
|
76 | 76 | <h3><%=l(:label_attachment_plural)%></h3> |
|
77 | 77 | <table width="100%"> |
|
78 | 78 | <% for attachment in @issue.attachments %> |
|
79 | 79 | <tr> |
|
80 | 80 | <td><%= image_tag('attachment') %> <%= link_to attachment.filename, :action => 'download', :id => @issue, :attachment_id => attachment %> (<%= human_size(attachment.filesize) %>)</td> |
|
81 | 81 | <td><%= format_date(attachment.created_on) %></td> |
|
82 | 82 | <td><%= attachment.author.display_name %></td> |
|
83 | 83 | <% if authorize_for('issues', 'destroy_attachment') %> |
|
84 | 84 | <td> |
|
85 | 85 | <%= start_form_tag :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment %> |
|
86 | 86 | <%= submit_tag l(:button_delete), :class => "button-small" %> |
|
87 | 87 | <%= end_form_tag %> |
|
88 | 88 | </td> |
|
89 | 89 | <% end %> |
|
90 | 90 | </tr> |
|
91 | 91 | <% end %> |
|
92 | 92 | </table> |
|
93 | 93 | <br /> |
|
94 | 94 | <% if authorize_for('issues', 'add_attachment') %> |
|
95 | 95 | <%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") %> |
|
96 | 96 | <p id="attachments_p"><label><%=l(:label_attachment_new)%> |
|
97 | 97 | <%= link_to_function image_tag('add'), "addFileField()" %></label> |
|
98 | 98 | <%= file_field_tag 'attachments[]', :size => 30 %></p> |
|
99 | 99 | <%= submit_tag l(:button_add) %> |
|
100 | 100 | <%= end_form_tag %> |
|
101 | 101 | <% end %> |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <% if authorize_for('issues', 'add_note') %> |
|
105 | 105 | <div class="box"> |
|
106 | 106 | <h3><%= l(:label_add_note) %></h3> |
|
107 | 107 | <%= start_form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) %> |
|
108 | 108 | <p><label for="notes"><%=l(:field_notes)%></label> |
|
109 | 109 | <%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p> |
|
110 | 110 | <%= submit_tag l(:button_add) %> |
|
111 | 111 | <%= end_form_tag %> |
|
112 | 112 | </div> |
|
113 | 113 | <% end %> |
@@ -1,45 +1,45 | |||
|
1 | 1 | <h3><%= l(:label_calendar) %></h3> |
|
2 | 2 | |
|
3 | 3 | <% |
|
4 | 4 | @date_from = Date.today - (Date.today.cwday-1) |
|
5 | 5 | @date_to = Date.today + (7-Date.today.cwday) |
|
6 | 6 | @issues = Issue.find :all, |
|
7 | 7 | :conditions => ["issues.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to], |
|
8 | 8 | :include => [:project, :tracker] unless @user.projects.empty? |
|
9 | 9 | @issues ||= [] |
|
10 | 10 | %> |
|
11 | 11 | |
|
12 | 12 | <table class="calenderTable"> |
|
13 | 13 | <tr class="ListHead"> |
|
14 | 14 | <td></td> |
|
15 | 15 | <% 1.upto(7) do |d| %> |
|
16 | 16 | <td align="center" width="14%"><%= day_name(d) %></td> |
|
17 | 17 | <% end %> |
|
18 | 18 | </tr> |
|
19 | 19 | <tr height="100"> |
|
20 | 20 | <% day = @date_from |
|
21 | 21 | while day <= @date_to |
|
22 | 22 | if day.cwday == 1 %> |
|
23 | 23 | <td valign="middle"><%= day.cweek %></td> |
|
24 | 24 | <% end %> |
|
25 | 25 | <td valign="top" width="14%" class="<%= day.month==@month ? "even" : "odd" %>"> |
|
26 | 26 | <p align="right"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> |
|
27 | 27 | <% day_issues = [] |
|
28 | 28 | @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } |
|
29 | 29 | day_issues.each do |i| %> |
|
30 | 30 | <%= if day == i.start_date and day == i.due_date |
|
31 | 31 | image_tag('arrow_bw') |
|
32 | 32 | elsif day == i.start_date |
|
33 | 33 | image_tag('arrow_from') |
|
34 | 34 | elsif day == i.due_date |
|
35 | 35 | image_tag('arrow_to') |
|
36 | 36 | end %> |
|
37 | <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> | |
|
37 | <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> | |
|
38 | 38 | <% end %> |
|
39 | 39 | </td> |
|
40 | 40 | <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %> |
|
41 | 41 | <% |
|
42 | 42 | day = day + 1 |
|
43 | 43 | end %> |
|
44 | 44 | </tr> |
|
45 | 45 | </table> No newline at end of file |
@@ -1,15 +1,7 | |||
|
1 | 1 | <h3><%=l(:label_document_plural)%></h3> |
|
2 | 2 | |
|
3 | <ul> | |
|
4 | <% for document in Document.find :all, | |
|
3 | <%= render(:partial => 'documents/document', | |
|
4 | :collection => Document.find(:all, | |
|
5 | 5 | :limit => 10, |
|
6 | 6 | :conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})", |
|
7 | :include => [:project] %> | |
|
8 | <li> | |
|
9 | <b><%= link_to document.title, :controller => 'documents', :action => 'show', :id => document %></b> | |
|
10 | <br /> | |
|
11 | <%= truncate document.description, 150 %><br /> | |
|
12 | <em><%= format_time(document.created_on) %></em><br /> | |
|
13 | </li> | |
|
14 | <% end unless @user.projects.empty? %> | |
|
15 | </ul> No newline at end of file | |
|
7 | :include => [:project])) unless @user.projects.empty? %> No newline at end of file |
@@ -1,13 +1,7 | |||
|
1 | 1 | <h3><%=l(:label_news_latest)%></h3> |
|
2 | 2 | |
|
3 | <ul> | |
|
4 | <% for news in News.find :all, | |
|
5 | :limit => 10, | |
|
6 | :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})", | |
|
7 | :include => [:project, :author] %> | |
|
8 | <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br /> | |
|
9 | <% unless news.summary.empty? %><%= news.summary %><br /><% end %> | |
|
10 | <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br /> | |
|
11 | </li> | |
|
12 | <% end unless @user.projects.empty? %> | |
|
13 | </ul> No newline at end of file | |
|
3 | <%= render (:partial => 'news/news', | |
|
4 | :collection => News.find(:all, | |
|
5 | :limit => 10, | |
|
6 | :conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})", | |
|
7 | :include => [:project, :author])) unless @user.projects.empty? %> No newline at end of file |
@@ -1,30 +1,30 | |||
|
1 | <h2><%=l(:label_my_page)%></h2> | |
|
2 | ||
|
3 | <div class="topright"> | |
|
4 | <small><%= link_to l(:label_personalize_page), :action => 'page_layout' %></small> | |
|
1 | <div class="contextual"> | |
|
2 | <%= link_to l(:label_personalize_page), :action => 'page_layout' %> | |
|
5 | 3 | </div> |
|
6 | 4 | |
|
5 | <h2><%=l(:label_my_page)%></h2> | |
|
6 | ||
|
7 | 7 | <div id="list-top"> |
|
8 | 8 | <% @blocks['top'].each do |b| %> |
|
9 | 9 | <div class="mypage-box"> |
|
10 | 10 | <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %> |
|
11 | 11 | </div> |
|
12 | 12 | <% end if @blocks['top'] %> |
|
13 | 13 | </div> |
|
14 | 14 | |
|
15 | 15 | <div id="list-left" class="splitcontentleft"> |
|
16 | 16 | <% @blocks['left'].each do |b| %> |
|
17 | 17 | <div class="mypage-box"> |
|
18 | 18 | <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %> |
|
19 | 19 | </div> |
|
20 | 20 | <% end if @blocks['left'] %> |
|
21 | 21 | </div> |
|
22 | 22 | |
|
23 | 23 | <div id="list-right" class="splitcontentright"> |
|
24 | 24 | <% @blocks['right'].each do |b| %> |
|
25 | 25 | <div class="mypage-box"> |
|
26 | 26 | <%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %> |
|
27 | 27 | </div> |
|
28 | 28 | <% end if @blocks['right'] %> |
|
29 | 29 | </div> |
|
30 | 30 |
@@ -1,121 +1,113 | |||
|
1 | 1 | <script language="JavaScript"> |
|
2 | 2 | |
|
3 | 3 | function recreateSortables() { |
|
4 | 4 | Sortable.destroy('list-top'); |
|
5 | 5 | Sortable.destroy('list-left'); |
|
6 | 6 | Sortable.destroy('list-right'); |
|
7 | 7 | |
|
8 | 8 | Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=top', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-top",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'}) |
|
9 | 9 | Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=left', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-left",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'}) |
|
10 | 10 | Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=right', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-right",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'}) |
|
11 | 11 | } |
|
12 | 12 | |
|
13 | 13 | function updateSelect() { |
|
14 | 14 | s = $('block-select') |
|
15 | 15 | for (var i = 0; i < s.options.length; i++) { |
|
16 | 16 | if ($('block_' + s.options[i].value)) { |
|
17 | 17 | s.options[i].disabled = true; |
|
18 | 18 | } else { |
|
19 | 19 | s.options[i].disabled = false; |
|
20 | 20 | } |
|
21 | 21 | } |
|
22 | 22 | s.options[0].selected = true; |
|
23 | 23 | } |
|
24 | 24 | |
|
25 | 25 | function afterAddBlock() { |
|
26 | 26 | recreateSortables(); |
|
27 | 27 | updateSelect(); |
|
28 | 28 | } |
|
29 | 29 | |
|
30 | 30 | function removeBlock(block) { |
|
31 | 31 | $(block).parentNode.removeChild($(block)); |
|
32 | 32 | updateSelect(); |
|
33 | 33 | } |
|
34 | 34 | |
|
35 | 35 | </script> |
|
36 | 36 | |
|
37 | <div style="float:right;"> | |
|
37 | <div class="contextual"> | |
|
38 | <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span> | |
|
38 | 39 | <%= start_form_tag({:action => "add_block"}, :id => "block-form") %> |
|
39 | ||
|
40 | <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select", :class => "select-small" %> | |
|
41 | <small> | |
|
40 | <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %> | |
|
42 | 41 | <%= link_to_remote l(:button_add), |
|
43 | 42 | :url => { :action => "add_block" }, |
|
44 | 43 | :with => "Form.serialize('block-form')", |
|
45 | 44 | :update => "list-top", |
|
46 | 45 | :position => :top, |
|
47 | 46 | :complete => "afterAddBlock();", |
|
48 | 47 | :loading => "Element.show('indicator')", |
|
49 | 48 | :loaded => "Element.hide('indicator')" |
|
50 | 49 | %> |
|
51 | </small> | |
|
52 | <%= end_form_tag %> | |
|
53 | <small>| | |
|
50 | <%= end_form_tag %> | | |
|
54 | 51 | <%= link_to l(:button_save), :action => 'page_layout_save' %> | |
|
55 | 52 | <%= link_to l(:button_cancel), :action => 'page' %> |
|
56 | </small> | |
|
57 | </div> | |
|
58 | ||
|
59 | <div style="float:right;margin-right:20px;"> | |
|
60 | <span id="indicator" style="display:none"><%= image_tag "loading.gif" %></span> | |
|
61 | 53 | </div> |
|
62 | 54 | |
|
63 | 55 | <h2><%=l(:label_my_page)%></h2> |
|
64 | 56 | |
|
65 | 57 | <div id="list-top" class="block-receiver"> |
|
66 | 58 | <% @blocks['top'].each do |b| %> |
|
67 | 59 | <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> |
|
68 | 60 | <% end if @blocks['top'] %> |
|
69 | 61 | </div> |
|
70 | 62 | |
|
71 | 63 | <div id="list-left" class="splitcontentleft block-receiver"> |
|
72 | 64 | <% @blocks['left'].each do |b| %> |
|
73 | 65 | <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> |
|
74 | 66 | <% end if @blocks['left'] %> |
|
75 | 67 | </div> |
|
76 | 68 | |
|
77 | 69 | <div id="list-right" class="splitcontentright block-receiver"> |
|
78 | 70 | <% @blocks['right'].each do |b| %> |
|
79 | 71 | <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> |
|
80 | 72 | <% end if @blocks['right'] %> |
|
81 | 73 | </div> |
|
82 | 74 | |
|
83 | 75 | <%= sortable_element 'list-top', |
|
84 | 76 | :tag => 'div', |
|
85 | 77 | :only => 'mypage-box', |
|
86 | 78 | :handle => "handle", |
|
87 | 79 | :dropOnEmpty => true, |
|
88 | 80 | :containment => ['list-top', 'list-left', 'list-right'], |
|
89 | 81 | :constraint => false, |
|
90 | 82 | :complete => visual_effect(:highlight, 'list-top'), |
|
91 | 83 | :url => { :action => "order_blocks", :group => "top" }, |
|
92 | 84 | :loading => "Element.show('indicator')", |
|
93 | 85 | :loaded => "Element.hide('indicator')" |
|
94 | 86 | %> |
|
95 | 87 | |
|
96 | 88 | |
|
97 | 89 | <%= sortable_element 'list-left', |
|
98 | 90 | :tag => 'div', |
|
99 | 91 | :only => 'mypage-box', |
|
100 | 92 | :handle => "handle", |
|
101 | 93 | :dropOnEmpty => true, |
|
102 | 94 | :containment => ['list-top', 'list-left', 'list-right'], |
|
103 | 95 | :constraint => false, |
|
104 | 96 | :complete => visual_effect(:highlight, 'list-left'), |
|
105 | 97 | :url => { :action => "order_blocks", :group => "left" }, |
|
106 | 98 | :loading => "Element.show('indicator')", |
|
107 | 99 | :loaded => "Element.hide('indicator')" %> |
|
108 | 100 | |
|
109 | 101 | <%= sortable_element 'list-right', |
|
110 | 102 | :tag => 'div', |
|
111 | 103 | :only => 'mypage-box', |
|
112 | 104 | :handle => "handle", |
|
113 | 105 | :dropOnEmpty => true, |
|
114 | 106 | :containment => ['list-top', 'list-left', 'list-right'], |
|
115 | 107 | :constraint => false, |
|
116 | 108 | :complete => visual_effect(:highlight, 'list-right'), |
|
117 | 109 | :url => { :action => "order_blocks", :group => "right" }, |
|
118 | 110 | :loading => "Element.show('indicator')", |
|
119 | 111 | :loaded => "Element.hide('indicator')" %> |
|
120 | 112 | |
|
121 | 113 | <%= javascript_tag "updateSelect()" %> No newline at end of file |
@@ -1,34 +1,34 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'pic picEdit' %> |
|
3 | 3 | <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> |
|
4 | 4 | </div> |
|
5 | 5 | |
|
6 | <h2><%= @news.title %></h2> | |
|
6 | <h2><%=h @news.title %></h2> | |
|
7 | 7 | |
|
8 | <p><em><%= @news.summary %><br /> | |
|
8 | <p><em><%=h @news.summary %><br /> | |
|
9 | 9 | <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p> |
|
10 | 10 | <br /> |
|
11 | 11 | <%= textilizable auto_link @news.description %> |
|
12 | 12 | <br /> |
|
13 | 13 | |
|
14 | 14 | <div id="comments" style="margin-bottom:16px;"> |
|
15 | 15 | <h3><%= l(:label_comment_plural) %></h3> |
|
16 | 16 | <% @news.comments.each do |comment| %> |
|
17 | 17 | <% next if comment.new_record? %> |
|
18 | 18 | <h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4> |
|
19 | 19 | <div class="contextual"> |
|
20 | 20 | <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> |
|
21 | 21 | </div> |
|
22 | 22 | <%= simple_format(auto_link(h comment.comment))%> |
|
23 | 23 | <% end if @news.comments_count > 0 %> |
|
24 | 24 | </div> |
|
25 | 25 | |
|
26 | 26 | <% if authorize_for 'news', 'add_comment' %> |
|
27 | 27 | <h3><%= l(:label_comment_add) %></h3> |
|
28 | 28 | <%= start_form_tag :action => 'add_comment', :id => @news %> |
|
29 | 29 | <%= error_messages_for 'comment' %> |
|
30 | 30 | <p><label for="comment_comment"><%= l(:field_comment) %></label><br /> |
|
31 | 31 | <%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %></p> |
|
32 | 32 | <%= submit_tag l(:button_add) %> |
|
33 | 33 | <%= end_form_tag %> |
|
34 | 34 | <% end %> No newline at end of file |
@@ -1,56 +1,56 | |||
|
1 | 1 | <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> |
|
2 | 2 | |
|
3 | 3 | <div> |
|
4 | 4 | <div class="rightbox"> |
|
5 | 5 | <%= start_form_tag %> |
|
6 | 6 | <p><%= select_month(@month, :prefix => "month", :discard_type => true) %> |
|
7 | 7 | <%= select_year(@year, :prefix => "year", :discard_type => true) %></p> |
|
8 | 8 | <%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0 %> <%=l(:label_issue_plural)%><br /> |
|
9 | 9 | <%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0 %> <%=l(:label_news_plural)%><br /> |
|
10 | 10 | <%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0 %> <%=l(:label_attachment_plural)%><br /> |
|
11 | 11 | <%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0 %> <%=l(:label_document_plural)%><br /> |
|
12 | 12 | <p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p> |
|
13 | 13 | <%= end_form_tag %> |
|
14 | 14 | </div> |
|
15 | 15 | <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %> |
|
16 | 16 | <h3><%= day_name(day.cwday) %> <%= day.day %></h3> |
|
17 | 17 | <ul> |
|
18 | 18 | <% @events_by_day[day].sort {|x,y| y.created_on <=> x.created_on }.each do |e| %> |
|
19 | 19 | <li><p> |
|
20 | 20 | <% if e.is_a? Issue %> |
|
21 | <%= e.created_on.strftime("%H:%M") %> <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %> (<%= e.status.name %>): <%= e.subject %><br /> | |
|
21 | <%= e.created_on.strftime("%H:%M") %> <%= link_to "#{e.tracker.name} ##{e.id}", :controller => 'issues', :action => 'show', :id => e %> (<%= e.status.name %>): <%=h e.subject %><br /> | |
|
22 | 22 | <i><%= e.author.name %></i> |
|
23 | 23 | <% elsif e.is_a? News %> |
|
24 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to e.title, :controller => 'news', :action => 'show', :id => e %><br /> | |
|
25 | <% unless e.summary.empty? %><%= e.summary %><br /><% end %> | |
|
24 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br /> | |
|
25 | <% unless e.summary.empty? %><%=h e.summary %><br /><% end %> | |
|
26 | 26 | <i><%= e.author.name %></i> |
|
27 | 27 | <% elsif (e.is_a? Attachment) and (e.container.is_a? Version) %> |
|
28 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%= e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br /> | |
|
28 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%=h e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br /> | |
|
29 | 29 | <i><%= e.author.name %></i> |
|
30 | 30 | <% elsif (e.is_a? Attachment) and (e.container.is_a? Document) %> |
|
31 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to e.container.title, :controller => 'documents', :action => 'show', :id => e.container %>)<br /> | |
|
31 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to h(e.container.title), :controller => 'documents', :action => 'show', :id => e.container %>)<br /> | |
|
32 | 32 | <i><%= e.author.name %></i> |
|
33 | 33 | <% elsif e.is_a? Document %> |
|
34 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to e.title, :controller => 'documents', :action => 'show', :id => e %><br /> | |
|
34 | <%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br /> | |
|
35 | 35 | <% end %> |
|
36 | 36 | </p></li> |
|
37 | 37 | |
|
38 | 38 | <% end %> |
|
39 | 39 | </ul> |
|
40 | 40 | <% end %> |
|
41 | 41 | <% if @events_by_day.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> |
|
42 | 42 | |
|
43 | 43 | <div style="float:left;"> |
|
44 | 44 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), |
|
45 | 45 | {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }}, |
|
46 | 46 | {:href => url_for(:action => 'activity', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))} |
|
47 | 47 | %> |
|
48 | 48 | </div> |
|
49 | 49 | <div style="float:right;"> |
|
50 | 50 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), |
|
51 | 51 | {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }}, |
|
52 | 52 | {:href => url_for(:action => 'activity', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))} |
|
53 | 53 | %> |
|
54 | 54 | </div> |
|
55 | 55 | <br /> |
|
56 | 56 | </div> No newline at end of file |
@@ -1,66 +1,66 | |||
|
1 | 1 | <h2><%= l(:label_calendar) %></h2> |
|
2 | 2 | |
|
3 | 3 | <table width="100%"> |
|
4 | 4 | <tr> |
|
5 | 5 | <td align="left" width="150"> |
|
6 | 6 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), |
|
7 | 7 | {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }}, |
|
8 | 8 | {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))} |
|
9 | 9 | %> |
|
10 | 10 | </td> |
|
11 | 11 | <td align="center"> |
|
12 | 12 | <%= start_form_tag :action => 'calendar', :id => @project %> |
|
13 | 13 | <%= select_month(@month, :prefix => "month", :discard_type => true) %> |
|
14 | 14 | <%= select_year(@year, :prefix => "year", :discard_type => true) %> |
|
15 | 15 | <%= submit_tag l(:button_submit), :class => "button-small" %> |
|
16 | 16 | <%= end_form_tag %> |
|
17 | 17 | </td> |
|
18 | 18 | <td align="right" width="150"> |
|
19 | 19 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), |
|
20 | 20 | {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }}, |
|
21 | 21 | {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))} |
|
22 | 22 | %> |
|
23 | 23 | </td> |
|
24 | 24 | </tr> |
|
25 | 25 | </table> |
|
26 | 26 | <br /> |
|
27 | 27 | |
|
28 | 28 | <table class="calenderTable"> |
|
29 | 29 | <tr class="ListHead"> |
|
30 | 30 | <td></td> |
|
31 | 31 | <% 1.upto(7) do |d| %> |
|
32 | 32 | <td align="center" width="14%"><%= day_name(d) %></td> |
|
33 | 33 | <% end %> |
|
34 | 34 | </tr> |
|
35 | 35 | <tr height="100"> |
|
36 | 36 | <% day = @date_from |
|
37 | 37 | while day <= @date_to |
|
38 | 38 | if day.cwday == 1 %> |
|
39 | 39 | <td valign="middle"><%= day.cweek %></td> |
|
40 | 40 | <% end %> |
|
41 | 41 | <td valign="top" width="14%" class="<%= day.month==@month ? "even" : "odd" %>"> |
|
42 | 42 | <p align="right"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> |
|
43 | 43 | <% day_issues = [] |
|
44 | 44 | @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } |
|
45 | 45 | day_issues.each do |i| %> |
|
46 | 46 | <%= if day == i.start_date and day == i.due_date |
|
47 | 47 | image_tag('arrow_bw') |
|
48 | 48 | elsif day == i.start_date |
|
49 | 49 | image_tag('arrow_from') |
|
50 | 50 | elsif day == i.due_date |
|
51 | 51 | image_tag('arrow_to') |
|
52 | 52 | end %> |
|
53 | <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> | |
|
53 | <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br /> | |
|
54 | 54 | <% end %> |
|
55 | 55 | </td> |
|
56 | 56 | <%= '</tr><tr height="100">' if day.cwday >= 7 and day!=@date_to %> |
|
57 | 57 | <% |
|
58 | 58 | day = day + 1 |
|
59 | 59 | end %> |
|
60 | 60 | </tr> |
|
61 | 61 | </table> |
|
62 | 62 | |
|
63 | 63 | <br /> |
|
64 | 64 | <%= image_tag 'arrow_from' %> <%= l(:text_tip_task_begin_day) %><br /> |
|
65 | 65 | <%= image_tag 'arrow_to' %> <%= l(:text_tip_task_end_day) %><br /> |
|
66 | 66 | <%= image_tag 'arrow_bw' %> <%= l(:text_tip_task_begin_end_day) %><br /> No newline at end of file |
@@ -1,28 +1,28 | |||
|
1 | 1 | <h2><%=l(:label_change_log)%></h2> |
|
2 | 2 | |
|
3 | 3 | <div> |
|
4 | 4 | |
|
5 | 5 | <div class="rightbox" style="width:140px;"> |
|
6 | 6 | <%= start_form_tag %> |
|
7 | 7 | <strong><%=l(:label_tracker_plural)%></strong><br /> |
|
8 | 8 | <% @trackers.each do |tracker| %> |
|
9 | 9 | <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> |
|
10 | 10 | <%= tracker.name %><br /> |
|
11 | 11 | <% end %> |
|
12 | 12 | <p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p> |
|
13 | 13 | <%= end_form_tag %> |
|
14 | 14 | </div> |
|
15 | 15 | |
|
16 | 16 | <% ver_id = nil |
|
17 | 17 | @fixed_issues.each do |issue| %> |
|
18 | 18 | <% unless ver_id == issue.fixed_version_id %> |
|
19 | 19 | <% if ver_id %></ul><% end %> |
|
20 | 20 | <h3><%= l(:label_version) %>: <%= issue.fixed_version.name %></h3> |
|
21 | 21 | <p><%= format_date(issue.fixed_version.effective_date) %><br /> |
|
22 | 22 | <%=h issue.fixed_version.description %></p> |
|
23 | 23 | <ul> |
|
24 | 24 | <% ver_id = issue.fixed_version_id |
|
25 | 25 | end %> |
|
26 | <li><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %> [<%= issue.tracker.name %>]: <%= issue.subject %></li> | |
|
26 | <li><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %> [<%= issue.tracker.name %>]: <%=h issue.subject %></li> | |
|
27 | 27 | <% end %> |
|
28 | 28 | </div> No newline at end of file |
@@ -1,11 +1,10 | |||
|
1 | 1 | <% pdf=IfpdfHelper::IFPDF.new |
|
2 | 2 | pdf.AliasNbPages |
|
3 | 3 | pdf.footer_date = format_date(Date.today) |
|
4 | pdf.AddPage | |
|
5 | 4 | @issues.each {|i| |
|
6 | render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i } | |
|
7 | 5 | pdf.AddPage |
|
6 | render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i } | |
|
8 | 7 | } |
|
9 | 8 | %> |
|
10 | 9 | |
|
11 | 10 | <%= pdf.Output %> No newline at end of file |
@@ -1,241 +1,241 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= l(:label_export_to) %> |
|
3 | 3 | <%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :output => 'pdf'}, :class => 'pic picPdf' %> |
|
4 | 4 | </div> |
|
5 | 5 | |
|
6 | 6 | <h2><%= l(:label_gantt) %></h2> |
|
7 | 7 | |
|
8 | 8 | <table width="100%"> |
|
9 | 9 | <tr> |
|
10 | 10 | <td align="left"> |
|
11 | 11 | <%= start_form_tag %> |
|
12 | 12 | <input type="text" name="months" size="2" value="<%= @months %>"> |
|
13 | 13 | <%= l(:label_months_from) %> |
|
14 | 14 | <%= select_month(@month_from, :prefix => "month", :discard_type => true) %> |
|
15 | 15 | <%= select_year(@year_from, :prefix => "year", :discard_type => true) %> |
|
16 | 16 | <%= hidden_field_tag 'zoom', @zoom %> |
|
17 | 17 | <%= submit_tag l(:button_submit), :class => "button-small" %> |
|
18 | 18 | <%= end_form_tag %> |
|
19 | 19 | </td> |
|
20 | 20 | <td align="right"> |
|
21 | 21 | <%= if @zoom < 4 |
|
22 | 22 | link_to image_tag('zoom_in'), {:zoom => (@zoom+1), :year => @year_from, :month => @month_from, :months => @months} |
|
23 | 23 | else |
|
24 | 24 | image_tag 'zoom_in_g' |
|
25 | 25 | end %> |
|
26 | 26 | <%= if @zoom > 1 |
|
27 | 27 | link_to image_tag('zoom_out'), :zoom => (@zoom-1), :year => @year_from, :month => @month_from, :months => @months |
|
28 | 28 | else |
|
29 | 29 | image_tag 'zoom_out_g' |
|
30 | 30 | end %> |
|
31 | 31 | </td> |
|
32 | 32 | </tr> |
|
33 | 33 | </table> |
|
34 | 34 | <br /> |
|
35 | 35 | |
|
36 | 36 | <style> |
|
37 | 37 | .m_bg { |
|
38 | 38 | position:absolute; |
|
39 | 39 | top:0; |
|
40 | 40 | height:16px; |
|
41 | 41 | border-top: 1px solid #c0c0c0; |
|
42 | 42 | border-bottom: 1px solid #c0c0c0; |
|
43 | 43 | border-right: 1px solid #c0c0c0; |
|
44 | 44 | text-align: center; |
|
45 | 45 | } |
|
46 | 46 | |
|
47 | 47 | .task { |
|
48 | 48 | position: absolute; |
|
49 | 49 | height:8px; |
|
50 | 50 | font-size:0.8em; |
|
51 | 51 | color:#888; |
|
52 | 52 | background:#aaa; |
|
53 | 53 | padding:0; |
|
54 | 54 | margin:0; |
|
55 | 55 | line-height:0.8em; |
|
56 | 56 | } |
|
57 | 57 | |
|
58 | 58 | .task_late { |
|
59 | 59 | background:#f66; |
|
60 | 60 | } |
|
61 | 61 | |
|
62 | 62 | .task_done { |
|
63 | 63 | background:#66f; |
|
64 | 64 | } |
|
65 | 65 | </style> |
|
66 | 66 | |
|
67 | 67 | <% zoom = 1 |
|
68 | 68 | @zoom.times { zoom = zoom * 2 } |
|
69 | 69 | |
|
70 | 70 | subject_width = 260 |
|
71 | 71 | header_heigth = 18 |
|
72 | 72 | |
|
73 | 73 | headers_heigth = header_heigth |
|
74 | 74 | show_weeks = false |
|
75 | 75 | show_days = false |
|
76 | 76 | |
|
77 | 77 | if @zoom >1 |
|
78 | 78 | show_weeks = true |
|
79 | 79 | headers_heigth = 2*header_heigth |
|
80 | 80 | if @zoom > 2 |
|
81 | 81 | show_days = true |
|
82 | 82 | headers_heigth = 3*header_heigth |
|
83 | 83 | end |
|
84 | 84 | end |
|
85 | 85 | |
|
86 | 86 | g_width = (@date_to - @date_from + 1)*zoom |
|
87 | 87 | g_height = [(20 * @issues.length + 6), 206].max |
|
88 | 88 | t_height = g_height + headers_heigth |
|
89 | 89 | %> |
|
90 | 90 | |
|
91 | 91 | <table width="100%" border=0 cellspacing=0 cellpading=0> |
|
92 | 92 | <tr> |
|
93 | 93 | <td width=260> |
|
94 | 94 | |
|
95 | 95 | <div style="position:relative;height:<%= t_height + 24 %>px;width:<%= subject_width + 1 %>px;"> |
|
96 | 96 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= headers_heigth %>px;" class="m_bg"></div> |
|
97 | 97 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= t_height %>px;border-left: 1px solid #c0c0c0;" class="m_bg"></div> |
|
98 | 98 | <% |
|
99 | 99 | # |
|
100 | 100 | # Tasks subjects |
|
101 | 101 | # |
|
102 | 102 | top = headers_heigth + 8 |
|
103 | 103 | @issues.each do |i| %> |
|
104 | 104 | <div style="position: absolute;line-height:1em;height:16px;top:<%= top %>px;left:4px;width:<%= subject_width - 5 %>px;overflow:hidden;"> |
|
105 | 105 | <small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: |
|
106 | <%= i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small> | |
|
106 | <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small> | |
|
107 | 107 | </div> |
|
108 | 108 | <% top = top + 20 |
|
109 | 109 | end %> |
|
110 | 110 | </div> |
|
111 | 111 | </td> |
|
112 | 112 | <td> |
|
113 | 113 | |
|
114 | 114 | <div style="position:relative;height:<%= t_height + 24 %>px;width:<%= subject_width %>;overflow:auto;"> |
|
115 | 115 | <div style="width:<%= g_width-1 %>px;height:<%= headers_heigth %>px;" class="m_bg"> </div> |
|
116 | 116 | <% |
|
117 | 117 | # |
|
118 | 118 | # Months headers |
|
119 | 119 | # |
|
120 | 120 | month_f = @date_from |
|
121 | 121 | left = 0 |
|
122 | 122 | height = (show_weeks ? header_heigth : header_heigth + g_height) |
|
123 | 123 | @months.times do |
|
124 | 124 | width = ((month_f >> 1) - month_f) * zoom - 1 |
|
125 | 125 | %> |
|
126 | 126 | <div style="left:<%= left %>px;width:<%= width %>px;height:<%= height %>px;" class="m_bg"> |
|
127 | 127 | <%= link_to "#{month_f.year}-#{month_f.month}", :year => month_f.year, :month => month_f.month, :zoom => @zoom, :months => @months %> |
|
128 | 128 | </div> |
|
129 | 129 | <% |
|
130 | 130 | left = left + width + 1 |
|
131 | 131 | month_f = month_f >> 1 |
|
132 | 132 | end %> |
|
133 | 133 | |
|
134 | 134 | <% |
|
135 | 135 | # |
|
136 | 136 | # Weeks headers |
|
137 | 137 | # |
|
138 | 138 | if show_weeks |
|
139 | 139 | left = 0 |
|
140 | 140 | height = (show_days ? header_heigth-1 : header_heigth-1 + g_height) |
|
141 | 141 | if @date_from.cwday == 1 |
|
142 | 142 | # @date_from is monday |
|
143 | 143 | week_f = @date_from |
|
144 | 144 | else |
|
145 | 145 | # find next monday after @date_from |
|
146 | 146 | week_f = @date_from + (7 - @date_from.cwday + 1) |
|
147 | 147 | width = (7 - @date_from.cwday + 1) * zoom-1 |
|
148 | 148 | %> |
|
149 | 149 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="m_bg"> </div> |
|
150 | 150 | <% |
|
151 | 151 | left = left + width+1 |
|
152 | 152 | end %> |
|
153 | 153 | <% |
|
154 | 154 | while week_f < @date_to |
|
155 | 155 | width = (week_f + 6 <= @date_to) ? 7 * zoom -1 : (@date_to - week_f + 1) * zoom-1 |
|
156 | 156 | %> |
|
157 | 157 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="m_bg"> |
|
158 | 158 | <small><%= week_f.cweek %></small> |
|
159 | 159 | </div> |
|
160 | 160 | <% |
|
161 | 161 | left = left + width+1 |
|
162 | 162 | week_f = week_f+7 |
|
163 | 163 | end |
|
164 | 164 | end %> |
|
165 | 165 | |
|
166 | 166 | <% |
|
167 | 167 | # |
|
168 | 168 | # Days headers |
|
169 | 169 | # |
|
170 | 170 | if show_days |
|
171 | 171 | left = 0 |
|
172 | 172 | height = g_height + header_heigth - 1 |
|
173 | 173 | wday = @date_from.cwday |
|
174 | 174 | (@date_to - @date_from + 1).to_i.times do |
|
175 | 175 | width = zoom - 1 |
|
176 | 176 | %> |
|
177 | 177 | <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" class="m_bg"> |
|
178 | 178 | <%= day_name(wday)[0,1] %> |
|
179 | 179 | </div> |
|
180 | 180 | <% |
|
181 | 181 | left = left + width+1 |
|
182 | 182 | wday = wday + 1 |
|
183 | 183 | wday = 1 if wday > 7 |
|
184 | 184 | end |
|
185 | 185 | end %> |
|
186 | 186 | |
|
187 | 187 | <% |
|
188 | 188 | # |
|
189 | 189 | # Today red line |
|
190 | 190 | # |
|
191 | 191 | if Date.today >= @date_from and Date.today <= @date_to %> |
|
192 | 192 | <div style="position: absolute;height:<%= g_height %>px;top:<%= headers_heigth + 1 %>px;left:<%= ((Date.today-@date_from+1)*zoom).floor()-1 %>px;width:10px;border-left: 1px dashed red;"> </div> |
|
193 | 193 | <% end %> |
|
194 | 194 | |
|
195 | 195 | <% |
|
196 | 196 | # |
|
197 | 197 | # Tasks |
|
198 | 198 | # |
|
199 | 199 | top = headers_heigth + 12 |
|
200 | 200 | @issues.each do |i| %> |
|
201 | 201 | <% |
|
202 | 202 | i_start_date = (i.start_date >= @date_from ? i.start_date : @date_from ) |
|
203 | 203 | i_end_date = (i.due_date <= @date_to ? i.due_date : @date_to ) |
|
204 | 204 | |
|
205 | 205 | i_done_date = i.start_date + ((i.due_date - i.start_date+1)*i.done_ratio/100).floor |
|
206 | 206 | i_done_date = (i_done_date <= @date_from ? @date_from : i_done_date ) |
|
207 | 207 | i_done_date = (i_done_date >= @date_to ? @date_to : i_done_date ) |
|
208 | 208 | |
|
209 | 209 | i_late_date = [i_end_date, Date.today].min if i_start_date < Date.today |
|
210 | 210 | |
|
211 | 211 | i_left = ((i_start_date - @date_from)*zoom).floor |
|
212 | 212 | i_width = ((i_end_date - i_start_date + 1)*zoom).floor |
|
213 | 213 | d_width = ((i_done_date - i_start_date)*zoom).floor |
|
214 | 214 | l_width = ((i_late_date - i_start_date+1)*zoom).floor if i_late_date |
|
215 | 215 | l_width ||= 0 |
|
216 | 216 | %> |
|
217 | 217 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;" class="task"> </div> |
|
218 | 218 | <% if l_width > 0 %> |
|
219 | 219 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= l_width %>px;" class="task task_late"> </div> |
|
220 | 220 | <% end %> |
|
221 | 221 | <% if d_width > 0 %> |
|
222 | 222 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= d_width %>px;" class="task task_done"> </div> |
|
223 | 223 | <% end %> |
|
224 | 224 | <div style="top:<%= top %>px;left:<%= i_left + i_width + 5 %>px;background:#fff;" class="task"> |
|
225 | 225 | <%= i.status.name %> |
|
226 | 226 | <%= (i.done_ratio).to_i %>% |
|
227 | 227 | </div> |
|
228 | 228 | <% top = top + 20 |
|
229 | 229 | end %> |
|
230 | 230 | </div> |
|
231 | 231 | </td> |
|
232 | 232 | </tr> |
|
233 | 233 | </table> |
|
234 | 234 | |
|
235 | 235 | <table width="100%"> |
|
236 | 236 | <tr> |
|
237 | 237 | <td align="left"><%= link_to ('« ' + l(:label_previous)), :year => (@date_from << @months).year, :month => (@date_from << @months).month, :zoom => @zoom, :months => @months %></td> |
|
238 | 238 | <td> |
|
239 | 239 | <td align="right"><%= link_to (l(:label_next) + ' »'), :year => (@date_from >> @months).year, :month => (@date_from >> @months).month, :zoom => @zoom, :months => @months %></td> |
|
240 | 240 | </tr> |
|
241 | 241 | </table> No newline at end of file |
@@ -1,20 +1,20 | |||
|
1 | 1 | <h2><%=l(:label_public_projects)%></h2> |
|
2 | 2 | |
|
3 | 3 | <table class="listTableContent"> |
|
4 | 4 | <tr class="ListHead"> |
|
5 | 5 | <%= sort_header_tag('name', :caption => l(:label_project)) %> |
|
6 | 6 | <th><%=l(:field_description)%></th> |
|
7 | 7 | <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> |
|
8 | 8 | </tr> |
|
9 | 9 | |
|
10 | 10 | <% for project in @projects %> |
|
11 | 11 | <tr class="<%= cycle("odd", "even") %>"> |
|
12 | 12 | <td><%= link_to project.name, :action => 'show', :id => project %> |
|
13 | <td><%= project.description %> | |
|
13 | <td><%=h project.description %> | |
|
14 | 14 | <td align="center"><%= format_date(project.created_on) %> |
|
15 | 15 | </tr> |
|
16 | 16 | <% end %> |
|
17 | 17 | </table> |
|
18 | 18 | |
|
19 | 19 | <%= pagination_links_full @project_pages %> |
|
20 | 20 | [ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ] No newline at end of file |
@@ -1,23 +1,13 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to_if_authorized l(:label_document_new), {:controller => 'projects', :action => 'add_document', :id => @project}, :class => 'pic picAdd' %> |
|
3 | 3 | </div> |
|
4 | 4 | |
|
5 | 5 | <h2><%=l(:label_document_plural)%></h2> |
|
6 | 6 | |
|
7 | 7 | <% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> |
|
8 | 8 | |
|
9 | 9 | <% documents = @documents.group_by {|d| d.category } %> |
|
10 | 10 | <% documents.each do |category, docs| %> |
|
11 | <h3><%= category.name %></h3> | |
|
12 | <ul> | |
|
13 | <% docs.each do |d| %> | |
|
14 | <li> | |
|
15 | <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b> | |
|
16 | <br /> | |
|
17 | <%= truncate d.description, 250 %><br /> | |
|
18 | <em><%= format_time(d.created_on) %></em><br /> | |
|
19 | </li> | |
|
20 | ||
|
21 | <% end %> | |
|
22 | </ul> | |
|
11 | <h3><%= category.name %></h3> | |
|
12 | <%= render :partial => 'documents/document', :collection => docs %> | |
|
23 | 13 | <% end %> No newline at end of file |
@@ -1,91 +1,91 | |||
|
1 | 1 | <% if @query.new_record? %> |
|
2 | 2 | <h2><%=l(:label_issue_plural)%></h2> |
|
3 | 3 | |
|
4 | 4 | <%= start_form_tag({:action => 'list_issues'}, :id => 'query_form') %> |
|
5 | 5 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
6 | 6 | <%= end_form_tag %> |
|
7 | 7 | <div class="contextual"> |
|
8 | 8 | <%= link_to_remote l(:button_apply), |
|
9 | 9 | { :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 }, |
|
10 | 10 | :update => "content", |
|
11 | 11 | :with => "Form.serialize('query_form')" |
|
12 | 12 | }, :class => 'pic picCheck' %> |
|
13 | 13 | |
|
14 | 14 | <%= link_to l(:button_clear), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1}, :class => 'pic picDelete' %> |
|
15 | 15 | <% if authorize_for('projects', 'add_query') %> |
|
16 | 16 | |
|
17 | 17 | <%= link_to_remote l(:button_save), |
|
18 | 18 | { :url => { :controller => 'projects', :action => "add_query", :id => @project }, |
|
19 | 19 | :method => 'get', |
|
20 | 20 | :update => "content", |
|
21 | 21 | :with => "Form.serialize('query_form')" |
|
22 | 22 | }, :class => 'pic picEdit' %> |
|
23 | 23 | <% end %> |
|
24 | 24 | </div> |
|
25 | 25 | <br /> |
|
26 | 26 | <% else %> |
|
27 | 27 | <% if authorize_for('projects', 'add_query') %> |
|
28 | 28 | <div class="contextual"> |
|
29 | 29 | <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'pic picEdit' %> |
|
30 | 30 | <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> |
|
31 | 31 | </div> |
|
32 | 32 | <% end %> |
|
33 | 33 | <h2><%= @query.name %></h2> |
|
34 | 34 | <% end %> |
|
35 | 35 | <%= error_messages_for 'query' %> |
|
36 | 36 | <% if @query.valid? %> |
|
37 | 37 | <% if @issues.empty? %> |
|
38 | 38 | <p><i><%= l(:label_no_data) %></i></p> |
|
39 | 39 | <% else %> |
|
40 | 40 | |
|
41 | 41 | <table class="listTableContent"> |
|
42 | 42 | <tr> |
|
43 | 43 | <td colspan="6" align="left"><small><%= check_all_links 'issues_form' %></small></td> |
|
44 | 44 | <td colspan="2" align="right"> |
|
45 | 45 | <small><%= l(:label_per_page) %>:</small> |
|
46 | 46 | <%= start_form_tag %> |
|
47 | 47 | <%= select_tag 'per_page', options_for_select(@results_per_page_options, @results_per_page), :class => 'select-small'%> |
|
48 | 48 | <%= submit_tag l(:button_apply), :class => 'button-small'%> |
|
49 | 49 | <%= end_form_tag %> |
|
50 | 50 | </td> |
|
51 | 51 | </tr> |
|
52 | 52 | </table> |
|
53 | 53 | <%= start_form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %> |
|
54 | 54 | <table class="listTableContent"> |
|
55 | 55 | |
|
56 | 56 | <tr class="ListHead"> |
|
57 | 57 | <td></td> |
|
58 | 58 | <%= sort_header_tag('issues.id', :caption => '#') %> |
|
59 | 59 | <%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %> |
|
60 | 60 | <%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %> |
|
61 | 61 | <th><%=l(:field_subject)%></th> |
|
62 | 62 | <%= sort_header_tag('users.lastname', :caption => l(:field_author)) %> |
|
63 | 63 | <%= sort_header_tag('issues.created_on', :caption => l(:field_created_on)) %> |
|
64 | 64 | <%= sort_header_tag('issues.updated_on', :caption => l(:field_updated_on)) %> |
|
65 | 65 | </tr> |
|
66 | 66 | <% for issue in @issues %> |
|
67 | 67 | <tr class="<%= cycle("odd", "even") %>"> |
|
68 | 68 | <td width="15"><%= check_box_tag "issue_ids[]", issue.id %></td> |
|
69 | 69 | <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td> |
|
70 | 70 | <td align="center" style="font-weight:bold;color:#<%= issue.status.html_color %>;"><%= issue.status.name %></font></td> |
|
71 | 71 | <td align="center"><%= issue.tracker.name %></td> |
|
72 | <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td> | |
|
72 | <td><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td> | |
|
73 | 73 | <td align="center"><%= issue.author.display_name %></td> |
|
74 | 74 | <td align="center"><%= format_time(issue.created_on) %></td> |
|
75 | 75 | <td align="center"><%= format_time(issue.updated_on) %></td> |
|
76 | 76 | </tr> |
|
77 | 77 | <% end %> |
|
78 | 78 | </table> |
|
79 | 79 | <div class="contextual"> |
|
80 | 80 | <%= l(:label_export_to) %> |
|
81 | 81 | <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'pic picCsv' %>, |
|
82 | 82 | <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'pic picPdf' %> |
|
83 | 83 | </div> |
|
84 | 84 | <p> |
|
85 | 85 | <%= pagination_links_full @issue_pages %> |
|
86 | 86 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] |
|
87 | 87 | </p> |
|
88 | 88 | <%= submit_tag l(:button_move) %> |
|
89 | 89 | <%= end_form_tag %> |
|
90 | 90 | <% end %> |
|
91 | 91 | <% end %> No newline at end of file |
@@ -1,20 +1,9 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to_if_authorized l(:label_news_new), {:controller => 'projects', :action => 'add_news', :id => @project}, :class => 'pic picAdd' %> |
|
3 | 3 | </div> |
|
4 | 4 | |
|
5 | 5 | <h2><%=l(:label_news_plural)%></h2> |
|
6 | 6 | |
|
7 | 7 | <% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> |
|
8 | ||
|
9 | <ul> | |
|
10 | <% for news in @news %> | |
|
11 | <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br /> | |
|
12 | <% unless news.summary.empty? %><%= news.summary %><br /><% end %> | |
|
13 | <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br /> | |
|
14 | <%= news.comments_count %> <%= lwr(:label_comment, news.comments_count).downcase %><br /> | |
|
15 | </li> | |
|
16 | <% end %> | |
|
17 | </ul> | |
|
18 | ||
|
19 | ||
|
8 | <%= render :partial => 'news/news', :collection => @news %> | |
|
20 | 9 | <%= pagination_links_full @news_pages %> |
@@ -1,72 +1,67 | |||
|
1 | 1 | <h2><%=l(:label_overview)%></h2> |
|
2 | 2 | |
|
3 | 3 | <div class="splitcontentleft"> |
|
4 | <%= simple_format(auto_link(@project.description)) %> | |
|
4 | <%= simple_format(auto_link(h @project.description)) %> | |
|
5 | 5 | <ul> |
|
6 | 6 | <% unless @project.homepage.empty? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %> |
|
7 | 7 | <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li> |
|
8 | 8 | <% for custom_value in @custom_values %> |
|
9 | 9 | <% if !custom_value.value.empty? %> |
|
10 | <li><%= custom_value.custom_field.name%>: <%= show_value(custom_value) %></li> | |
|
10 | <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> | |
|
11 | 11 | <% end %> |
|
12 | 12 | <% end %> |
|
13 | 13 | </ul> |
|
14 | 14 | |
|
15 | 15 | <div class="box"> |
|
16 | 16 | <h3><%= image_tag "tracker" %> <%=l(:label_tracker_plural)%></h3> |
|
17 | 17 | <ul> |
|
18 | 18 | <% for tracker in @trackers %> |
|
19 | 19 | <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project, |
|
20 | 20 | :set_filter => 1, |
|
21 | 21 | "tracker_id" => tracker.id %>: |
|
22 | 22 | <%= issue_count = Issue.count(:conditions => ["project_id=? and tracker_id=? and issue_statuses.is_closed=?", @project.id, tracker.id, false], :include => :status) %> |
|
23 | 23 | <%= lwr(:label_open_issues, issue_count) %> |
|
24 | 24 | </li> |
|
25 | 25 | <% end %> |
|
26 | 26 | </ul> |
|
27 | 27 | <% if authorize_for 'projects', 'add_issue' %> |
|
28 | 28 | » <%=l(:label_issue_new)%>: |
|
29 | 29 | <ul> |
|
30 | 30 | <% @trackers.each do |tracker| %> |
|
31 | 31 | <li><%= link_to tracker.name, :controller => 'projects', :action => 'add_issue', :id => @project, :tracker_id => tracker %></li> |
|
32 | 32 | <% end %> |
|
33 | 33 | </ul> |
|
34 | 34 | <% end %> |
|
35 |
<center><small> |
|
|
35 | <center><small><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></small></center> | |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | |
|
39 | 39 | <div class="splitcontentright"> |
|
40 | 40 | <div class="box"> |
|
41 | 41 | <h3><%= image_tag "users" %> <%=l(:label_member_plural)%></h3> |
|
42 | 42 | <% for member in @members %> |
|
43 | 43 | <%= link_to_user member.user %> (<%= member.role.name %>)<br /> |
|
44 | 44 | <% end %> |
|
45 | 45 | </div> |
|
46 | 46 | |
|
47 | 47 | <% if @subprojects %> |
|
48 | 48 | <div class="box"> |
|
49 | 49 | <h3><%= image_tag "projects" %> <%=l(:label_subproject_plural)%></h3> |
|
50 | 50 | <% for subproject in @subprojects %> |
|
51 | 51 | <%= link_to subproject.name, :action => 'show', :id => subproject %><br /> |
|
52 | 52 | <% end %> |
|
53 | 53 | </div> |
|
54 | 54 | <% end %> |
|
55 | 55 | |
|
56 | 56 | <div class="box"> |
|
57 | 57 | <h3><%=l(:label_news_latest)%></h3> |
|
58 | <% for news in @news %> | |
|
59 | <p><b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br /> | |
|
60 | <%= news.summary %> | |
|
61 | <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small></p> | |
|
62 | <hr /> | |
|
63 | <% end %> | |
|
64 | <center><small>[ <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center> | |
|
58 | <%= render :partial => 'news/news', :collection => @news %> | |
|
59 | <center><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></center> | |
|
65 | 60 | </div> |
|
66 | 61 | </div> |
|
67 | 62 | |
|
68 | 63 | |
|
69 | 64 | |
|
70 | 65 | |
|
71 | 66 | |
|
72 | 67 |
@@ -1,30 +1,30 | |||
|
1 | 1 | <%= error_messages_for 'user' %> |
|
2 | 2 | |
|
3 | 3 | <!--[form:user]--> |
|
4 | 4 | <div class="box"> |
|
5 | 5 | <h3><%=l(:label_information_plural)%></h3> |
|
6 | 6 | <p><%= f.text_field :login, :required => true, :size => 25 %></p> |
|
7 | 7 | <p><%= f.text_field :firstname, :required => true %></p> |
|
8 | 8 | <p><%= f.text_field :lastname, :required => true %></p> |
|
9 | 9 | <p><%= f.text_field :mail, :required => true %></p> |
|
10 | 10 | <p><%= f.select :language, lang_options_for_select %></p> |
|
11 | 11 | |
|
12 | 12 | <% for @custom_value in @custom_values %> |
|
13 | 13 | <p><%= custom_field_tag_with_label @custom_value %></p> |
|
14 | <% end %> | |
|
14 | <% end if @custom_values%> | |
|
15 | 15 | |
|
16 | 16 | <p><%= f.check_box :admin %></p> |
|
17 | 17 | <p><%= f.check_box :mail_notification %></p> |
|
18 | 18 | </div> |
|
19 | 19 | |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <h3><%=l(:label_authentication)%></h3> |
|
22 | 22 | <% unless @auth_sources.empty? %> |
|
23 | 23 | <p><%= f.select :auth_source_id, [[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] } %></p> |
|
24 | 24 | <% end %> |
|
25 | 25 | <p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label> |
|
26 | 26 | <%= password_field_tag 'password', nil, :size => 25 %></p> |
|
27 | 27 | <p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label> |
|
28 | 28 | <%= password_field_tag 'password_confirmation', nil, :size => 25 %></p> |
|
29 | 29 | </div> |
|
30 | 30 | <!--[eoform:user]--> |
@@ -1,30 +1,23 | |||
|
1 | 1 | <h2><%= $RDM_WELCOME_TITLE || l(:label_home) %></h2> |
|
2 | 2 | |
|
3 | 3 | <div class="splitcontentleft"> |
|
4 | 4 | <% if $RDM_WELCOME_TEXT %><p><%= $RDM_WELCOME_TEXT %></p><br /><% end %> |
|
5 | 5 | <div class="box"> |
|
6 | 6 | <h3><%=l(:label_news_latest)%></h3> |
|
7 | <% for news in @news %> | |
|
8 | <p> | |
|
9 | <b><%= news.title %></b> (<%= link_to_user news.author %> <%= format_time(news.created_on) %> - <%= news.project.name %>)<br /> | |
|
10 | <% unless news.summary.empty? %><%= news.summary %><br /><% end %> | |
|
11 | [<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>] | |
|
12 | </p> | |
|
13 | <hr /> | |
|
14 | <% end %> | |
|
7 | <%= render :partial => 'news/news', :collection => @news %> | |
|
15 | 8 | </div> |
|
16 | 9 | </div> |
|
17 | 10 | |
|
18 | 11 | <div class="splitcontentright"> |
|
19 | 12 | <div class="box"> |
|
20 | 13 | <h3><%=l(:label_project_latest)%></h3> |
|
21 | 14 | <ul> |
|
22 | 15 | <% for project in @projects %> |
|
23 | 16 | <li> |
|
24 | 17 | <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)<br /> |
|
25 | <%= project.description %> | |
|
18 | <%=h project.description %> | |
|
26 | 19 | </li> |
|
27 | 20 | <% end %> |
|
28 | 21 | </ul> |
|
29 | 22 | </div> |
|
30 | 23 | </div> |
@@ -1,506 +1,509 | |||
|
1 | 1 | /* andreas08 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer. Version: 1.0, November 28, 2005 */ |
|
2 | 2 | /* Edited by Jean-Philippe Lang *> |
|
3 | 3 | /**************** Body and tag styles ****************/ |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | #header * {margin:0; padding:0;} |
|
7 | 7 | p, ul, ol, li {margin:0; padding:0;} |
|
8 | 8 | |
|
9 | 9 | |
|
10 | 10 | body{ |
|
11 | 11 | font:76% Verdana,Tahoma,Arial,sans-serif; |
|
12 | 12 | line-height:1.4em; |
|
13 | 13 | text-align:center; |
|
14 | 14 | color:#303030; |
|
15 | 15 | background:#e8eaec; |
|
16 | 16 | margin:0; |
|
17 | 17 | } |
|
18 | 18 | |
|
19 | 19 | |
|
20 | 20 | a{ |
|
21 | 21 | color:#467aa7; |
|
22 | 22 | font-weight:bold; |
|
23 | 23 | text-decoration:none; |
|
24 | 24 | background-color:inherit; |
|
25 | 25 | } |
|
26 | 26 | |
|
27 | 27 | a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;} |
|
28 | 28 | a img{border:none;} |
|
29 | 29 | |
|
30 | 30 | p{padding:0 0 1em 0;} |
|
31 | 31 | p form{margin-top:0; margin-bottom:20px;} |
|
32 | 32 | |
|
33 | 33 | img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;} |
|
34 | 34 | img.left{float:left; margin:0 12px 5px 0;} |
|
35 | 35 | img.center{display:block; margin:0 auto 5px auto;} |
|
36 | 36 | img.right{float:right; margin:0 0 5px 12px;} |
|
37 | 37 | |
|
38 | 38 | /**************** Header and navigation styles ****************/ |
|
39 | 39 | |
|
40 | 40 | #container{ |
|
41 | 41 | width:100%; |
|
42 | 42 | min-width: 800px; |
|
43 | 43 | margin:0; |
|
44 | 44 | padding:0; |
|
45 | 45 | text-align:left; |
|
46 | 46 | background:#ffffff; |
|
47 | 47 | color:#303030; |
|
48 | 48 | } |
|
49 | 49 | |
|
50 | 50 | #header{ |
|
51 | 51 | height:4.5em; |
|
52 | 52 | /*width:758px;*/ |
|
53 | 53 | margin:0; |
|
54 | 54 | background:#467aa7; |
|
55 | 55 | color:#ffffff; |
|
56 | 56 | margin-bottom:1px; |
|
57 | 57 | } |
|
58 | 58 | |
|
59 | 59 | #header h1{ |
|
60 | 60 | padding:10px 0 0 20px; |
|
61 | 61 | font-size:2em; |
|
62 | 62 | background-color:inherit; |
|
63 | 63 | color:#fff; /*rgb(152, 26, 33);*/ |
|
64 | 64 | letter-spacing:-1px; |
|
65 | 65 | font-weight:bold; |
|
66 | 66 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
67 | 67 | } |
|
68 | 68 | |
|
69 | 69 | #header h2{ |
|
70 | 70 | margin:3px 0 0 40px; |
|
71 | 71 | font-size:1.5em; |
|
72 | 72 | background-color:inherit; |
|
73 | 73 | color:#f0f2f4; |
|
74 | 74 | letter-spacing:-1px; |
|
75 | 75 | font-weight:normal; |
|
76 | 76 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
77 | 77 | } |
|
78 | 78 | |
|
79 | 79 | #navigation{ |
|
80 | 80 | height:2.2em; |
|
81 | 81 | line-height:2.2em; |
|
82 | 82 | /*width:758px;*/ |
|
83 | 83 | margin:0; |
|
84 | 84 | background:#578bb8; |
|
85 | 85 | color:#ffffff; |
|
86 | 86 | } |
|
87 | 87 | |
|
88 | 88 | #navigation li{ |
|
89 | 89 | float:left; |
|
90 | 90 | list-style-type:none; |
|
91 | 91 | border-right:1px solid #ffffff; |
|
92 | 92 | white-space:nowrap; |
|
93 | 93 | } |
|
94 | 94 | |
|
95 | 95 | #navigation li.right { |
|
96 | 96 | float:right; |
|
97 | 97 | list-style-type:none; |
|
98 | 98 | border-right:0; |
|
99 | 99 | border-left:1px solid #ffffff; |
|
100 | 100 | white-space:nowrap; |
|
101 | 101 | } |
|
102 | 102 | |
|
103 | 103 | #navigation li a{ |
|
104 | 104 | display:block; |
|
105 | 105 | padding:0px 10px 0px 22px; |
|
106 | 106 | font-size:0.8em; |
|
107 | 107 | font-weight:normal; |
|
108 | 108 | /*text-transform:uppercase;*/ |
|
109 | 109 | text-decoration:none; |
|
110 | 110 | background-color:inherit; |
|
111 | 111 | color: #ffffff; |
|
112 | 112 | } |
|
113 | 113 | |
|
114 | 114 | * html #navigation a {width:1%;} |
|
115 | 115 | |
|
116 | 116 | #navigation .selected,#navigation a:hover{ |
|
117 | 117 | color:#ffffff; |
|
118 | 118 | text-decoration:none; |
|
119 | 119 | background-color: #80b0da; |
|
120 | 120 | } |
|
121 | 121 | |
|
122 | 122 | /**************** Icons links *******************/ |
|
123 | 123 | .picHome { background: url(../images/home.png) no-repeat 4px 50%; } |
|
124 | 124 | .picUser { background: url(../images/user.png) no-repeat 4px 50%; } |
|
125 | 125 | .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; } |
|
126 | 126 | .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; } |
|
127 | 127 | .picProject { background: url(../images/projects.png) no-repeat 4px 50%; } |
|
128 | 128 | .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; } |
|
129 | 129 | .picHelp { background: url(../images/help.png) no-repeat 4px 50%; } |
|
130 | 130 | |
|
131 | 131 | .picEdit { background: url(../images/edit.png) no-repeat 4px 50%; } |
|
132 | 132 | .picDelete { background: url(../images/delete.png) no-repeat 4px 50%; } |
|
133 | 133 | .picAdd { background: url(../images/add.png) no-repeat 4px 50%; } |
|
134 | 134 | .picMove { background: url(../images/move.png) no-repeat 4px 50%; } |
|
135 | 135 | .picCheck { background: url(../images/check.png) no-repeat 4px 70%; } |
|
136 | 136 | .picPdf { background: url(../images/pdf.png) no-repeat 4px 50%;} |
|
137 | 137 | .picCsv { background: url(../images/csv.png) no-repeat 4px 50%;} |
|
138 | 138 | |
|
139 | 139 | .pic { padding-left: 18px; margin-left: 3px; } |
|
140 | 140 | /**************** Content styles ****************/ |
|
141 | 141 | |
|
142 | 142 | html>body #content { |
|
143 | 143 | height: auto; |
|
144 | 144 | min-height: 500px; |
|
145 | 145 | } |
|
146 | 146 | |
|
147 | 147 | #content{ |
|
148 | 148 | /*float:right;*/ |
|
149 | 149 | /*width:530px;*/ |
|
150 | 150 | width: auto; |
|
151 | 151 | height:500px; |
|
152 | 152 | font-size:0.9em; |
|
153 | 153 | padding:20px 10px 10px 20px; |
|
154 | 154 | /*position: absolute;*/ |
|
155 | 155 | margin-left: 120px; |
|
156 | 156 | border-left: 1px dashed #c0c0c0; |
|
157 | 157 | |
|
158 | 158 | } |
|
159 | 159 | |
|
160 | 160 | #content h2{ |
|
161 | 161 | display:block; |
|
162 | 162 | margin:0 0 16px 0; |
|
163 | 163 | font-size:1.7em; |
|
164 | 164 | font-weight:normal; |
|
165 | 165 | letter-spacing:-1px; |
|
166 | 166 | color:#606060; |
|
167 | 167 | background-color:inherit; |
|
168 | 168 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
169 | 169 | } |
|
170 | 170 | |
|
171 | 171 | #content h2 a{font-weight:normal;} |
|
172 | 172 | #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;} |
|
173 | 173 | #content a:hover,#subcontent a:hover{text-decoration:underline;} |
|
174 | 174 | #content ul,#content ol{margin:0 5px 16px 35px;} |
|
175 | 175 | #content dl{margin:0 5px 10px 25px;} |
|
176 | 176 | #content dt{font-weight:bold; margin-bottom:5px;} |
|
177 | 177 | #content dd{margin:0 0 10px 15px;} |
|
178 | 178 | |
|
179 | 179 | |
|
180 | 180 | /***********************************************/ |
|
181 | 181 | |
|
182 | 182 | /* |
|
183 | 183 | form{ |
|
184 | 184 | padding:15px; |
|
185 | 185 | margin:0 0 20px 0; |
|
186 | 186 | border:1px solid #c0c0c0; |
|
187 | 187 | background-color:#CEE1ED; |
|
188 | 188 | width:600px; |
|
189 | 189 | } |
|
190 | 190 | */ |
|
191 | 191 | |
|
192 | 192 | form { |
|
193 | 193 | display: inline; |
|
194 | 194 | } |
|
195 | 195 | |
|
196 | 196 | .noborder { |
|
197 | 197 | border:0px; |
|
198 | 198 | background-color:#fff; |
|
199 | 199 | width:100%; |
|
200 | 200 | } |
|
201 | 201 | |
|
202 | 202 | textarea { |
|
203 | 203 | padding:0; |
|
204 | 204 | margin:0; |
|
205 | 205 | } |
|
206 | 206 | |
|
207 | 207 | blockquote { |
|
208 | 208 | padding-left: 6px; |
|
209 | 209 | border-left: 2px solid #ccc; |
|
210 | 210 | } |
|
211 | 211 | |
|
212 | 212 | input { |
|
213 | 213 | vertical-align: middle; |
|
214 | 214 | } |
|
215 | 215 | |
|
216 | 216 | input.button-small |
|
217 | 217 | { |
|
218 | 218 | font-size: 0.8em; |
|
219 | 219 | } |
|
220 | 220 | |
|
221 | 221 | select { |
|
222 | 222 | vertical-align: middle; |
|
223 | 223 | } |
|
224 | 224 | |
|
225 | 225 | .select-small |
|
226 | 226 | { |
|
227 | 227 | border: 1px solid #7F9DB9; |
|
228 | 228 | padding: 1px; |
|
229 | 229 | font-size: 0.8em; |
|
230 | 230 | } |
|
231 | 231 | |
|
232 | 232 | .active-filter |
|
233 | 233 | { |
|
234 | 234 | background-color: #F9FA9E; |
|
235 | 235 | |
|
236 | 236 | } |
|
237 | 237 | |
|
238 | 238 | label { |
|
239 | 239 | font-weight: bold; |
|
240 | 240 | font-size: 1em; |
|
241 | 241 | } |
|
242 | 242 | |
|
243 | 243 | fieldset { |
|
244 | 244 | border:1px solid #7F9DB9; |
|
245 | 245 | padding: 6px; |
|
246 | 246 | } |
|
247 | 247 | |
|
248 | 248 | legend { |
|
249 | 249 | color: #505050; |
|
250 | 250 | |
|
251 | 251 | } |
|
252 | 252 | |
|
253 | 253 | .required { |
|
254 | 254 | color: #bb0000; |
|
255 | 255 | } |
|
256 | 256 | |
|
257 | 257 | table.listTableContent { |
|
258 | 258 | border:1px solid #578bb8; |
|
259 | 259 | width:100%; |
|
260 | 260 | border-collapse: collapse; |
|
261 | 261 | } |
|
262 | 262 | |
|
263 | 263 | table.listTableContent td { |
|
264 | 264 | padding:2px; |
|
265 | 265 | } |
|
266 | 266 | |
|
267 | 267 | tr.ListHead { |
|
268 | 268 | background-color:#467aa7; |
|
269 | 269 | color:#FFFFFF; |
|
270 | 270 | text-align:center; |
|
271 | 271 | } |
|
272 | 272 | |
|
273 | 273 | tr.ListHead a { |
|
274 | 274 | color:#FFFFFF; |
|
275 | 275 | text-decoration:underline; |
|
276 | 276 | } |
|
277 | 277 | |
|
278 | 278 | .odd { |
|
279 | 279 | background-color:#f0f1f2; |
|
280 | 280 | } |
|
281 | 281 | .even { |
|
282 | 282 | background-color: #fff; |
|
283 | 283 | } |
|
284 | 284 | |
|
285 | 285 | table.reportTableContent { |
|
286 | 286 | border:1px solid #c0c0c0; |
|
287 | 287 | width:99%; |
|
288 | 288 | border-collapse: collapse; |
|
289 | 289 | } |
|
290 | 290 | |
|
291 | 291 | table.reportTableContent td { |
|
292 | 292 | padding:2px; |
|
293 | 293 | } |
|
294 | 294 | |
|
295 | 295 | table.calenderTable { |
|
296 | 296 | border:1px solid #578bb8; |
|
297 | 297 | width:99%; |
|
298 | 298 | border-collapse: collapse; |
|
299 | 299 | } |
|
300 | 300 | |
|
301 | 301 | table.calenderTable td { |
|
302 | 302 | border:1px solid #578bb8; |
|
303 | 303 | } |
|
304 | 304 | |
|
305 | 305 | hr { border:none; border-bottom: dotted 1px #c0c0c0; } |
|
306 | 306 | |
|
307 | 307 | |
|
308 | 308 | /**************** Sidebar styles ****************/ |
|
309 | 309 | |
|
310 | 310 | #subcontent{ |
|
311 | 311 | position: absolute; |
|
312 | 312 | left: 0px; |
|
313 | 313 | width:110px; |
|
314 | 314 | padding:20px 20px 10px 5px; |
|
315 | 315 | } |
|
316 | 316 | |
|
317 | 317 | #subcontent h2{ |
|
318 | 318 | display:block; |
|
319 | 319 | margin:0 0 5px 0; |
|
320 | 320 | font-size:1.0em; |
|
321 | 321 | font-weight:bold; |
|
322 | 322 | text-align:left; |
|
323 | 323 | color:#606060; |
|
324 | 324 | background-color:inherit; |
|
325 | 325 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
326 | 326 | } |
|
327 | 327 | |
|
328 | 328 | #subcontent p{margin:0 0 16px 0; font-size:0.9em;} |
|
329 | 329 | |
|
330 | 330 | /**************** Menublock styles ****************/ |
|
331 | 331 | |
|
332 | 332 | .menublock{margin:0 0 20px 8px; font-size:0.8em;} |
|
333 | 333 | .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;} |
|
334 | 334 | .menublock li a{font-weight:bold; text-decoration:none;} |
|
335 | 335 | .menublock li a:hover{text-decoration:none;} |
|
336 | 336 | .menublock li ul{margin:0; font-size:1em; font-weight:normal;} |
|
337 | 337 | .menublock li ul li{margin-bottom:0;} |
|
338 | 338 | .menublock li ul a{font-weight:normal;} |
|
339 | 339 | |
|
340 | 340 | /**************** Searchbar styles ****************/ |
|
341 | 341 | |
|
342 | 342 | #searchbar{margin:0 0 20px 0;} |
|
343 | 343 | #searchbar form fieldset{margin-left:10px; border:0 solid;} |
|
344 | 344 | |
|
345 | 345 | #searchbar #s{ |
|
346 | 346 | height:1.2em; |
|
347 | 347 | width:110px; |
|
348 | 348 | margin:0 5px 0 0; |
|
349 | 349 | border:1px solid #a0a0a0; |
|
350 | 350 | } |
|
351 | 351 | |
|
352 | 352 | #searchbar #searchbutton{ |
|
353 | 353 | width:auto; |
|
354 | 354 | padding:0 1px; |
|
355 | 355 | border:1px solid #808080; |
|
356 | 356 | font-size:0.9em; |
|
357 | 357 | text-align:center; |
|
358 | 358 | } |
|
359 | 359 | |
|
360 | 360 | /**************** Footer styles ****************/ |
|
361 | 361 | |
|
362 | 362 | #footer{ |
|
363 | 363 | clear:both; |
|
364 | 364 | /*width:758px;*/ |
|
365 | 365 | padding:5px 0; |
|
366 | 366 | margin:0; |
|
367 | 367 | font-size:0.9em; |
|
368 | 368 | color:#f0f0f0; |
|
369 | 369 | background:#467aa7; |
|
370 | 370 | } |
|
371 | 371 | |
|
372 | 372 | #footer p{padding:0; margin:0; text-align:center;} |
|
373 | 373 | #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;} |
|
374 | 374 | #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;} |
|
375 | 375 | |
|
376 | 376 | /**************** Misc classes and styles ****************/ |
|
377 | 377 | |
|
378 | 378 | .splitcontentleft{float:left; width:49%;} |
|
379 | 379 | .splitcontentright{float:right; width:49%;} |
|
380 | 380 | .clear{clear:both;} |
|
381 | 381 | .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;} |
|
382 | 382 | .hide{display:none;} |
|
383 | 383 | .textcenter{text-align:center;} |
|
384 | 384 | .textright{text-align:right;} |
|
385 | 385 | .important{color:#f02025; background-color:inherit; font-weight:bold;} |
|
386 | 386 | |
|
387 | 387 | .box{ |
|
388 | 388 | margin:0 0 20px 0; |
|
389 | 389 | padding:10px; |
|
390 | 390 | border:1px solid #c0c0c0; |
|
391 | 391 | background-color:#fafbfc; |
|
392 | 392 | color:#505050; |
|
393 | 393 | line-height:1.5em; |
|
394 | 394 | } |
|
395 | 395 | |
|
396 | 396 | a.close-icon { |
|
397 | 397 | display:block; |
|
398 | 398 | margin-top:3px; |
|
399 | 399 | overflow:hidden; |
|
400 | 400 | width:12px; |
|
401 | 401 | height:12px; |
|
402 | 402 | background-repeat: no-repeat; |
|
403 | 403 | cursor:hand; |
|
404 | 404 | cursor:pointer; |
|
405 | 405 | background-image:url('../images/close.png'); |
|
406 | 406 | } |
|
407 | 407 | |
|
408 | 408 | a.close-icon:hover { |
|
409 | 409 | background-image:url('../images/close_hl.png'); |
|
410 | 410 | } |
|
411 | 411 | |
|
412 | 412 | .rightbox{ |
|
413 | 413 | background: #fafbfc; |
|
414 | 414 | border: 1px solid #c0c0c0; |
|
415 | 415 | float: right; |
|
416 | 416 | padding: 8px; |
|
417 | 417 | position: relative; |
|
418 | 418 | margin: 0 5px 5px; |
|
419 | 419 | } |
|
420 | 420 | |
|
421 | 421 | .layout-active { |
|
422 | 422 | background: #ECF3E1; |
|
423 | 423 | } |
|
424 | 424 | |
|
425 | 425 | .block-receiver { |
|
426 | 426 | border:1px dashed #c0c0c0; |
|
427 | 427 | margin-bottom: 20px; |
|
428 | 428 | padding: 15px 0 15px 0; |
|
429 | 429 | } |
|
430 | 430 | |
|
431 | 431 | .mypage-box { |
|
432 | 432 | margin:0 0 20px 0; |
|
433 | 433 | color:#505050; |
|
434 | 434 | line-height:1.5em; |
|
435 | 435 | } |
|
436 | 436 | |
|
437 | 437 | .handle { |
|
438 | 438 | cursor: move; |
|
439 | 439 | } |
|
440 | 440 | |
|
441 | 441 | .topright{ |
|
442 | 442 | position: absolute; |
|
443 | 443 | right: 25px; |
|
444 | 444 | top: 100px; |
|
445 | 445 | } |
|
446 | 446 | |
|
447 | 447 | .login { |
|
448 | 448 | width: 50%; |
|
449 | 449 | text-align: left; |
|
450 | 450 | } |
|
451 | 451 | |
|
452 | 452 | img.calendar-trigger { |
|
453 | 453 | cursor: pointer; |
|
454 | 454 | vertical-align: middle; |
|
455 | 455 | margin-left: 4px; |
|
456 | 456 | } |
|
457 | 457 | |
|
458 | 458 | #history h4, #comments h4 { |
|
459 | 459 | font-size: 1em; |
|
460 | 460 | margin-bottom: 12px; |
|
461 | 461 | margin-top: 20px; |
|
462 | 462 | font-weight: normal; |
|
463 | 463 | border-bottom: dotted 1px #c0c0c0; |
|
464 | 464 | } |
|
465 | 465 | |
|
466 | 466 | #history p { |
|
467 | 467 | margin-left: 34px; |
|
468 | 468 | } |
|
469 | 469 | |
|
470 | 470 | /***** Contextual links div *****/ |
|
471 | 471 | .contextual { |
|
472 | 472 | float: right; |
|
473 | 473 | font-size: 0.8em; |
|
474 | 474 | } |
|
475 | 475 | |
|
476 | .contextual select { | |
|
477 | font-size: 1em; | |
|
478 | } | |
|
476 | 479 | |
|
477 | 480 | |
|
478 | 481 | /***** CSS FORM ******/ |
|
479 | 482 | .tabular p{ |
|
480 | 483 | margin: 0; |
|
481 | 484 | padding: 5px 0 8px 0; |
|
482 | 485 | padding-left: 180px; /*width of left column containing the label elements*/ |
|
483 | 486 | height: 1%; |
|
484 | 487 | } |
|
485 | 488 | |
|
486 | 489 | .tabular label{ |
|
487 | 490 | font-weight: bold; |
|
488 | 491 | float: left; |
|
489 | 492 | margin-left: -180px; /*width of left column*/ |
|
490 | 493 | width: 175px; /*width of labels. Should be smaller than left column to create some right |
|
491 | 494 | margin*/ |
|
492 | 495 | } |
|
493 | 496 | |
|
494 | 497 | .error { |
|
495 | 498 | color: #cc0000; |
|
496 | 499 | } |
|
497 | 500 | |
|
498 | 501 | |
|
499 | 502 | /*.threepxfix class below: |
|
500 | 503 | Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents. |
|
501 | 504 | to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html |
|
502 | 505 | */ |
|
503 | 506 | |
|
504 | 507 | * html .threepxfix{ |
|
505 | 508 | margin-left: 3px; |
|
506 | 509 | } No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now