##// END OF EJS Templates
query model/controller added...
Jean-Philippe Lang -
r76:da91e5e95a54
parent child
Show More
@@ -0,0 +1,55
1 class QueriesController < ApplicationController
2 layout 'base'
3
4 def index
5 list
6 render :action => 'list'
7 end
8
9 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
10 verify :method => :post, :only => [ :destroy, :create, :update ],
11 :redirect_to => { :action => :list }
12
13 def list
14 @query_pages, @queries = paginate :queries, :per_page => 10
15 end
16
17 def show
18 @query = Query.find(params[:id])
19 end
20
21 def new
22 @query = Query.new(params[:query])
23
24 params[:fields].each do |field|
25 @query.add_filter(field, params[:operators][field], params[:values][field])
26 end if params[:fields]
27
28 if request.post? and @query.save
29 flash[:notice] = 'Query was successfully created.'
30 redirect_to :action => 'list'
31 end
32 end
33
34 def edit
35 @query = Query.find(params[:id])
36
37 if request.post?
38 @query.filters = {}
39 params[:fields].each do |field|
40 @query.add_filter(field, params[:operators][field], params[:values][field])
41 end if params[:fields]
42 @query.attributes = params[:query]
43
44 if @query.save
45 flash[:notice] = 'Query was successfully updated.'
46 redirect_to :action => 'show', :id => @query
47 end
48 end
49 end
50
51 def destroy
52 Query.find(params[:id]).destroy
53 redirect_to :action => 'list'
54 end
55 end
@@ -0,0 +1,2
1 module QueriesHelper
2 end
@@ -0,0 +1,123
1 class Query < ActiveRecord::Base
2 serialize :filters
3
4 validates_presence_of :name
5
6 @@operators = { "=" => "Egal",
7 "!" => "Different",
8 "o" => "Ouvert",
9 "c" => "Ferme",
10 "!*" => "Aucun",
11 "*" => "Tous",
12 "<t+" => "Dans moins de",
13 ">t+" => "Dans plus de",
14 "t+" => "Dans exactement",
15 "t" => "Aujourd'hui",
16 ">t-" => "Il y a moins de",
17 "<t-" => "Il y a plus de",
18 "t-" => "Il y a exactement" }
19
20 @@operators_by_filter_type = { :list => [ "=", "!" ],
21 :list_status => [ "o", "=", "!", "c" ],
22 :list_optional => [ "=", "!", "!*", "*" ],
23 :date => [ "<t+", ">t+", "t+", "t", ">t-", "<t-", "t-" ],
24 :date_past => [ ">t-", "<t-", "t-", "t" ] }
25
26 @@available_filters = { "status_id" => { :type => :list_status, :order => 1,
27 :values => IssueStatus.find(:all).collect{|s| [s.name, s.id.to_s] } },
28 "tracker_id" => { :type => :list, :order => 2,
29 :values => Tracker.find(:all).collect{|s| [s.name, s.id.to_s] } },
30 "assigned_to_id" => { :type => :list_optional, :order => 3,
31 :values => User.find(:all).collect{|s| [s.display_name, s.id.to_s] } },
32 "priority_id" => { :type => :list, :order => 4,
33 :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect{|s| [s.name, s.id.to_s] } },
34 "created_on" => { :type => :date_past, :order => 5 },
35 "updated_on" => { :type => :date_past, :order => 6 },
36 "start_date" => { :type => :date, :order => 7 },
37 "due_date" => { :type => :date, :order => 8 } }
38
39 cattr_accessor :available_filters
40
41 def initialize(attributes = nil)
42 super
43 self.filters ||= { 'status_id' => {:operator => "o"} }
44 end
45
46 def validate
47 errors.add_to_base "Au moins un critere doit etre selectionne" unless filters && !filters.empty?
48 filters.each_key do |field|
49 errors.add field.gsub(/\_id$/, ""), "doit etre renseigne" unless
50 # filter requires one or more values
51 (values_for(field) and !values_for(field).first.empty?) or
52 # filter doesn't require any value
53 ["o", "c", "!*", "*", "t"].include? operator_for(field)
54 end if filters
55 end
56
57 def add_filter(field, operator, values)
58 # values must be an array
59 return unless values and values.is_a? Array
60 # check if field is defined as an available filter
61 if @@available_filters.has_key? field
62 filter_options = @@available_filters[field]
63 # check if operator is allowed for that filter
64 if @@operators_by_filter_type[filter_options[:type]].include? operator
65 filters[field] = {:operator => operator, :values => values }
66 end
67 end
68 end
69
70 def has_filter?(field)
71 filters and filters[field]
72 end
73
74 def operator_for(field)
75 has_filter?(field) ? filters[field][:operator] : nil
76 end
77
78 def values_for(field)
79 has_filter?(field) ? filters[field][:values] : nil
80 end
81
82 def statement
83 sql = "1=1"
84 filters.each_key do |field|
85 sql = sql + " AND " unless sql.empty?
86 v = values_for field
87 case operator_for field
88 when "="
89 sql = sql + "issues.#{field} IN (" + v.each(&:to_i).join(",") + ")"
90 when "!"
91 sql = sql + "issues.#{field} NOT IN (" + v.each(&:to_i).join(",") + ")"
92 when "!*"
93 sql = sql + "issues.#{field} IS NULL"
94 when "*"
95 sql = sql + "issues.#{field} IS NOT NULL"
96 when "o"
97 sql = sql + "issue_statuses.is_closed=#{connection.quoted_false}" if field == "status_id"
98 when "c"
99 sql = sql + "issue_statuses.is_closed=#{connection.quoted_true}" if field == "status_id"
100 when ">t-"
101 sql = sql + "issues.#{field} >= '%s'" % connection.quoted_date(Date.today - v.first.to_i)
102 when "<t-"
103 sql = sql + "issues.#{field} <= '" + (Date.today - v.first.to_i).strftime("%Y-%m-%d") + "'"
104 when "t-"
105 sql = sql + "issues.#{field} = '" + (Date.today - v.first.to_i).strftime("%Y-%m-%d") + "'"
106 when ">t+"
107 sql = sql + "issues.#{field} >= '" + (Date.today + v.first.to_i).strftime("%Y-%m-%d") + "'"
108 when "<t+"
109 sql = sql + "issues.#{field} <= '" + (Date.today + v.first.to_i).strftime("%Y-%m-%d") + "'"
110 when "t+"
111 sql = sql + "issues.#{field} = '" + (Date.today + v.first.to_i).strftime("%Y-%m-%d") + "'"
112 when "t"
113 sql = sql + "issues.#{field} = '%s'" % connection.quoted_date(Date.today)
114 end
115 end if filters
116 sql
117 end
118
119 def self.operators_for_select(filter_type)
120 @@operators_by_filter_type[filter_type].collect {|o| [@@operators[o], o]}
121 end
122
123 end
@@ -0,0 +1,72
1 <script>
2
3 function toggle_filter(field) {
4 check_box = $('cb_' + field);
5
6 if (check_box.checked) {
7 Element.show("operators[" + field + "]");
8 toggle_operator(field);
9 } else {
10 Element.hide("operators[" + field + "]");
11 Element.hide("values_div[" + field + "]");
12 }
13 }
14
15 function toggle_operator(field) {
16 operator = $("operators[" + field + "]");
17 switch (operator.value) {
18 case "!*":
19 case "*":
20 case "t":
21 case "o":
22 case "c":
23 Element.hide("values_div[" + field + "]");
24 break;
25 default:
26 Element.show("values_div[" + field + "]");
27 break;
28 }
29 }
30
31 function toggle_multi_select(field) {
32 select = $('values[' + field + '][]');
33 if (select.multiple == true) {
34 select.multiple = false;
35 } else {
36 select.multiple = true;
37 }
38 }
39
40 </script>
41
42 <fieldset><legend>Filtres</legend>
43 <table>
44 <% Query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %>
45 <% field = filter[0]
46 options = filter[1] %>
47 <tr>
48 <td valign="top" width="200">
49 <%= check_box_tag 'fields[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
50 <label for="cb_<%= field %>"><%= l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label>
51 </td>
52 <td valign="top" width="150">
53 <%= select_tag "operators[#{field}]", options_for_select(Query.operators_for_select(options[:type]), query.operator_for(field)), :onchange => "toggle_operator('#{field}');", :class => "select-small", :style => "vertical-align: top;" %>
54 </td>
55 <td valign="top">
56 <div id="values_div[<%= field %>]">
57 <% case options[:type]
58 when :list, :list_optional, :list_status %>
59 <select <%= "multiple=true" if query.values_for(field) and query.values_for(field).length > 1 %>" name="values[<%= field %>][]" id="values[<%= field %>][]" class="select-small" style="vertical-align: top;">
60 <%= options_for_select options[:values], query.values_for(field) %>
61 </select>
62 <%= link_to_function '+', "toggle_multi_select('#{field}');" %>
63 <% when :date, :date_past %>
64 <%= text_field_tag "values[#{field}][]", query.values_for(field), :size => 3, :class => "select-small" %> jours
65 <% end %>
66 </div>
67 </td>
68 </tr>
69 <script>toggle_filter('<%= field %>');</script>
70 <% end %>
71 </table>
72 </fieldset> No newline at end of file
@@ -0,0 +1,18
1 <%= error_messages_for 'query' %>
2
3 <!--[form:query]-->
4 <div class="box">
5
6 <div class="tabular">
7 <p><label for="query_name">Name</label>
8 <%= text_field 'query', 'name', :size => 80 %></p>
9
10 <p><label for="query_is_public">Public</label>
11 <%= check_box 'query', 'is_public' %></p>
12 </div>
13
14 <%= render :partial => 'filters', :locals => {:query => query}%>
15
16 </div>
17 <!--[eoform:query]-->
18
@@ -0,0 +1,8
1 <h1>Editing query</h1>
2
3 <%= start_form_tag :action => 'edit', :id => @query %>
4 <%= render :partial => 'form', :locals => {:query => @query} %>
5 <%= submit_tag 'Edit' %>
6 <%= end_form_tag %>
7
8 <%= debug @query.statement %> No newline at end of file
@@ -0,0 +1,27
1 <h1>Listing queries</h1>
2
3 <table>
4 <tr>
5 <% for column in Query.content_columns %>
6 <th><%= column.human_name %></th>
7 <% end %>
8 </tr>
9
10 <% for query in @queries %>
11 <tr>
12 <% for column in Query.content_columns %>
13 <td><%=h query.send(column.name) %></td>
14 <% end %>
15 <td><%= link_to 'Show', :action => 'show', :id => query %></td>
16 <td><%= link_to 'Edit', :action => 'edit', :id => query %></td>
17 <td><%= link_to 'Destroy', { :action => 'destroy', :id => query }, :confirm => 'Are you sure?', :post => true %></td>
18 </tr>
19 <% end %>
20 </table>
21
22 <%= link_to 'Previous page', { :page => @query_pages.current.previous } if @query_pages.current.previous %>
23 <%= link_to 'Next page', { :page => @query_pages.current.next } if @query_pages.current.next %>
24
25 <br />
26
27 <%= link_to 'New query', :action => 'new' %>
@@ -0,0 +1,9
1 <h1>New query</h1>
2
3 <%= start_form_tag :action => 'new' %>
4 <%= render :partial => 'form', :locals => {:query => @query} %>
5 <%= submit_tag "Create" %>
6 <%= end_form_tag %>
7
8 <%= debug @query %>
9 <%= debug params %>
@@ -0,0 +1,8
1 <% for column in Query.content_columns %>
2 <p>
3 <b><%= column.human_name %>:</b> <%=h @query.send(column.name) %>
4 </p>
5 <% end %>
6
7 <%= link_to 'Edit', :action => 'edit', :id => @query %> |
8 <%= link_to 'Back', :action => 'list' %>
@@ -1,470 +1,472
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class ProjectsController < ApplicationController
18 class ProjectsController < ApplicationController
19 layout 'base', :except => :export_issues_pdf
19 layout 'base', :except => :export_issues_pdf
20 before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
20 before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
21 before_filter :require_admin, :only => [ :add, :destroy ]
21 before_filter :require_admin, :only => [ :add, :destroy ]
22
22
23 helper :sort
23 helper :sort
24 include SortHelper
24 include SortHelper
25 helper :search_filter
25 helper :search_filter
26 include SearchFilterHelper
26 include SearchFilterHelper
27 helper :custom_fields
27 helper :custom_fields
28 include CustomFieldsHelper
28 include CustomFieldsHelper
29 helper :ifpdf
29 helper :ifpdf
30 include IfpdfHelper
30 include IfpdfHelper
31 helper IssuesHelper
31 helper IssuesHelper
32
32
33 def index
33 def index
34 list
34 list
35 render :action => 'list' unless request.xhr?
35 render :action => 'list' unless request.xhr?
36 end
36 end
37
37
38 # Lists public projects
38 # Lists public projects
39 def list
39 def list
40 sort_init 'name', 'asc'
40 sort_init 'name', 'asc'
41 sort_update
41 sort_update
42 @project_count = Project.count(["is_public=?", true])
42 @project_count = Project.count(["is_public=?", true])
43 @project_pages = Paginator.new self, @project_count,
43 @project_pages = Paginator.new self, @project_count,
44 15,
44 15,
45 @params['page']
45 @params['page']
46 @projects = Project.find :all, :order => sort_clause,
46 @projects = Project.find :all, :order => sort_clause,
47 :conditions => ["is_public=?", true],
47 :conditions => ["is_public=?", true],
48 :limit => @project_pages.items_per_page,
48 :limit => @project_pages.items_per_page,
49 :offset => @project_pages.current.offset
49 :offset => @project_pages.current.offset
50
50
51 render :action => "list", :layout => false if request.xhr?
51 render :action => "list", :layout => false if request.xhr?
52 end
52 end
53
53
54 # Add a new project
54 # Add a new project
55 def add
55 def add
56 @custom_fields = IssueCustomField.find(:all)
56 @custom_fields = IssueCustomField.find(:all)
57 @root_projects = Project.find(:all, :conditions => "parent_id is null")
57 @root_projects = Project.find(:all, :conditions => "parent_id is null")
58 @project = Project.new(params[:project])
58 @project = Project.new(params[:project])
59 if request.get?
59 if request.get?
60 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
60 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
61 else
61 else
62 @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
62 @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
63 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
63 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
64 @project.custom_values = @custom_values
64 @project.custom_values = @custom_values
65 if @project.save
65 if @project.save
66 flash[:notice] = l(:notice_successful_create)
66 flash[:notice] = l(:notice_successful_create)
67 redirect_to :controller => 'admin', :action => 'projects'
67 redirect_to :controller => 'admin', :action => 'projects'
68 end
68 end
69 end
69 end
70 end
70 end
71
71
72 # Show @project
72 # Show @project
73 def show
73 def show
74 @custom_values = @project.custom_values.find(:all, :include => :custom_field)
74 @custom_values = @project.custom_values.find(:all, :include => :custom_field)
75 @members = @project.members.find(:all, :include => [:user, :role])
75 @members = @project.members.find(:all, :include => [:user, :role])
76 @subprojects = @project.children if @project.children_count > 0
76 @subprojects = @project.children if @project.children_count > 0
77 @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
77 @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
78 @trackers = Tracker.find(:all)
78 @trackers = Tracker.find(:all)
79 end
79 end
80
80
81 def settings
81 def settings
82 @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id])
82 @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id])
83 @custom_fields = IssueCustomField::find_all
83 @custom_fields = IssueCustomField::find_all
84 @issue_category ||= IssueCategory.new
84 @issue_category ||= IssueCategory.new
85 @member ||= @project.members.new
85 @member ||= @project.members.new
86 @roles = Role.find_all
86 @roles = Role.find_all
87 @users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user }
87 @users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user }
88 @custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
88 @custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
89 end
89 end
90
90
91 # Edit @project
91 # Edit @project
92 def edit
92 def edit
93 if request.post?
93 if request.post?
94 @project.custom_fields = IssueCustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
94 @project.custom_fields = IssueCustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids]
95 if params[:custom_fields]
95 if params[:custom_fields]
96 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
96 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
97 @project.custom_values = @custom_values
97 @project.custom_values = @custom_values
98 end
98 end
99 if @project.update_attributes(params[:project])
99 if @project.update_attributes(params[:project])
100 flash[:notice] = l(:notice_successful_update)
100 flash[:notice] = l(:notice_successful_update)
101 redirect_to :action => 'settings', :id => @project
101 redirect_to :action => 'settings', :id => @project
102 else
102 else
103 settings
103 settings
104 render :action => 'settings'
104 render :action => 'settings'
105 end
105 end
106 end
106 end
107 end
107 end
108
108
109 # Delete @project
109 # Delete @project
110 def destroy
110 def destroy
111 if request.post? and params[:confirm]
111 if request.post? and params[:confirm]
112 @project.destroy
112 @project.destroy
113 redirect_to :controller => 'admin', :action => 'projects'
113 redirect_to :controller => 'admin', :action => 'projects'
114 end
114 end
115 end
115 end
116
116
117 # Add a new issue category to @project
117 # Add a new issue category to @project
118 def add_issue_category
118 def add_issue_category
119 if request.post?
119 if request.post?
120 @issue_category = @project.issue_categories.build(params[:issue_category])
120 @issue_category = @project.issue_categories.build(params[:issue_category])
121 if @issue_category.save
121 if @issue_category.save
122 flash[:notice] = l(:notice_successful_create)
122 flash[:notice] = l(:notice_successful_create)
123 redirect_to :action => 'settings', :id => @project
123 redirect_to :action => 'settings', :id => @project
124 else
124 else
125 settings
125 settings
126 render :action => 'settings'
126 render :action => 'settings'
127 end
127 end
128 end
128 end
129 end
129 end
130
130
131 # Add a new version to @project
131 # Add a new version to @project
132 def add_version
132 def add_version
133 @version = @project.versions.build(params[:version])
133 @version = @project.versions.build(params[:version])
134 if request.post? and @version.save
134 if request.post? and @version.save
135 flash[:notice] = l(:notice_successful_create)
135 flash[:notice] = l(:notice_successful_create)
136 redirect_to :action => 'settings', :id => @project
136 redirect_to :action => 'settings', :id => @project
137 end
137 end
138 end
138 end
139
139
140 # Add a new member to @project
140 # Add a new member to @project
141 def add_member
141 def add_member
142 @member = @project.members.build(params[:member])
142 @member = @project.members.build(params[:member])
143 if request.post?
143 if request.post?
144 if @member.save
144 if @member.save
145 flash[:notice] = l(:notice_successful_create)
145 flash[:notice] = l(:notice_successful_create)
146 redirect_to :action => 'settings', :id => @project
146 redirect_to :action => 'settings', :id => @project
147 else
147 else
148 settings
148 settings
149 render :action => 'settings'
149 render :action => 'settings'
150 end
150 end
151 end
151 end
152 end
152 end
153
153
154 # Show members list of @project
154 # Show members list of @project
155 def list_members
155 def list_members
156 @members = @project.members
156 @members = @project.members
157 end
157 end
158
158
159 # Add a new document to @project
159 # Add a new document to @project
160 def add_document
160 def add_document
161 @categories = Enumeration::get_values('DCAT')
161 @categories = Enumeration::get_values('DCAT')
162 @document = @project.documents.build(params[:document])
162 @document = @project.documents.build(params[:document])
163 if request.post?
163 if request.post?
164 # Save the attachment
164 # Save the attachment
165 if params[:attachment][:file].size > 0
165 if params[:attachment][:file].size > 0
166 @attachment = @document.attachments.build(params[:attachment])
166 @attachment = @document.attachments.build(params[:attachment])
167 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
167 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
168 end
168 end
169 if @document.save
169 if @document.save
170 flash[:notice] = l(:notice_successful_create)
170 flash[:notice] = l(:notice_successful_create)
171 redirect_to :action => 'list_documents', :id => @project
171 redirect_to :action => 'list_documents', :id => @project
172 end
172 end
173 end
173 end
174 end
174 end
175
175
176 # Show documents list of @project
176 # Show documents list of @project
177 def list_documents
177 def list_documents
178 @documents = @project.documents
178 @documents = @project.documents
179 end
179 end
180
180
181 # Add a new issue to @project
181 # Add a new issue to @project
182 def add_issue
182 def add_issue
183 @tracker = Tracker.find(params[:tracker_id])
183 @tracker = Tracker.find(params[:tracker_id])
184 @priorities = Enumeration::get_values('IPRI')
184 @priorities = Enumeration::get_values('IPRI')
185 @issue = Issue.new(:project => @project, :tracker => @tracker)
185 @issue = Issue.new(:project => @project, :tracker => @tracker)
186 if request.get?
186 if request.get?
187 @issue.start_date = Date.today
187 @issue.start_date = Date.today
188 @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) }
188 @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) }
189 else
189 else
190 @issue.attributes = params[:issue]
190 @issue.attributes = params[:issue]
191 @issue.author_id = self.logged_in_user.id if self.logged_in_user
191 @issue.author_id = self.logged_in_user.id if self.logged_in_user
192 # Multiple file upload
192 # Multiple file upload
193 params[:attachments].each { |a|
193 params[:attachments].each { |a|
194 @attachment = @issue.attachments.build(:file => a, :author => self.logged_in_user) unless a.size == 0
194 @attachment = @issue.attachments.build(:file => a, :author => self.logged_in_user) unless a.size == 0
195 } if params[:attachments] and params[:attachments].is_a? Array
195 } if params[:attachments] and params[:attachments].is_a? Array
196 @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
196 @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
197 @issue.custom_values = @custom_values
197 @issue.custom_values = @custom_values
198 if @issue.save
198 if @issue.save
199 flash[:notice] = l(:notice_successful_create)
199 flash[:notice] = l(:notice_successful_create)
200 Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
200 Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
201 redirect_to :action => 'list_issues', :id => @project
201 redirect_to :action => 'list_issues', :id => @project
202 end
202 end
203 end
203 end
204 end
204 end
205
205
206 # Show filtered/sorted issues list of @project
206 # Show filtered/sorted issues list of @project
207 def list_issues
207 def list_issues
208 sort_init 'issues.id', 'desc'
208 sort_init 'issues.id', 'desc'
209 sort_update
209 sort_update
210
210
211 search_filter_init_list_issues
211 @query = Query.new
212 search_filter_update if params[:set_filter]
212 params[:fields].each do |field|
213 @query.add_filter(field, params[:operators][field], params[:values][field])
214 end if params[:fields]
213
215
214 @results_per_page_options = [ 15, 25, 50, 100 ]
216 @results_per_page_options = [ 15, 25, 50, 100 ]
215 if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i
217 if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i
216 @results_per_page = params[:per_page].to_i
218 @results_per_page = params[:per_page].to_i
217 session[:results_per_page] = @results_per_page
219 session[:results_per_page] = @results_per_page
218 else
220 else
219 @results_per_page = session[:results_per_page] || 25
221 @results_per_page = session[:results_per_page] || 25
220 end
222 end
221
223
222 @issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause)
224 @issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement)
223 @issue_pages = Paginator.new self, @issue_count, @results_per_page, @params['page']
225 @issue_pages = Paginator.new self, @issue_count, @results_per_page, @params['page']
224 @issues = Issue.find :all, :order => sort_clause,
226 @issues = Issue.find :all, :order => sort_clause,
225 :include => [ :author, :status, :tracker, :project ],
227 :include => [ :author, :status, :tracker, :project ],
226 :conditions => search_filter_clause,
228 :conditions => @query.statement,
227 :limit => @issue_pages.items_per_page,
229 :limit => @issue_pages.items_per_page,
228 :offset => @issue_pages.current.offset
230 :offset => @issue_pages.current.offset
229
231
230 render :layout => false if request.xhr?
232 render :layout => false if request.xhr?
231 end
233 end
232
234
233 # Export filtered/sorted issues list to CSV
235 # Export filtered/sorted issues list to CSV
234 def export_issues_csv
236 def export_issues_csv
235 sort_init 'issues.id', 'desc'
237 sort_init 'issues.id', 'desc'
236 sort_update
238 sort_update
237
239
238 search_filter_init_list_issues
240 search_filter_init_list_issues
239
241
240 @issues = Issue.find :all, :order => sort_clause,
242 @issues = Issue.find :all, :order => sort_clause,
241 :include => [ :author, :status, :tracker, :project, :custom_values ],
243 :include => [ :author, :status, :tracker, :project, :custom_values ],
242 :conditions => search_filter_clause
244 :conditions => search_filter_clause
243
245
244 ic = Iconv.new('ISO-8859-1', 'UTF-8')
246 ic = Iconv.new('ISO-8859-1', 'UTF-8')
245 export = StringIO.new
247 export = StringIO.new
246 CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
248 CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
247 # csv header fields
249 # csv header fields
248 headers = [ "#", l(:field_status), l(:field_tracker), l(:field_subject), l(:field_author), l(:field_created_on), l(:field_updated_on) ]
250 headers = [ "#", l(:field_status), l(:field_tracker), l(:field_subject), l(:field_author), l(:field_created_on), l(:field_updated_on) ]
249 for custom_field in @project.all_custom_fields
251 for custom_field in @project.all_custom_fields
250 headers << custom_field.name
252 headers << custom_field.name
251 end
253 end
252 csv << headers.collect {|c| ic.iconv(c) }
254 csv << headers.collect {|c| ic.iconv(c) }
253 # csv lines
255 # csv lines
254 @issues.each do |issue|
256 @issues.each do |issue|
255 fields = [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)]
257 fields = [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)]
256 for custom_field in @project.all_custom_fields
258 for custom_field in @project.all_custom_fields
257 fields << (show_value issue.custom_value_for(custom_field))
259 fields << (show_value issue.custom_value_for(custom_field))
258 end
260 end
259 csv << fields.collect {|c| ic.iconv(c.to_s) }
261 csv << fields.collect {|c| ic.iconv(c.to_s) }
260 end
262 end
261 end
263 end
262 export.rewind
264 export.rewind
263 send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv')
265 send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv')
264 end
266 end
265
267
266 # Export filtered/sorted issues to PDF
268 # Export filtered/sorted issues to PDF
267 def export_issues_pdf
269 def export_issues_pdf
268 sort_init 'issues.id', 'desc'
270 sort_init 'issues.id', 'desc'
269 sort_update
271 sort_update
270
272
271 search_filter_init_list_issues
273 search_filter_init_list_issues
272
274
273 @issues = Issue.find :all, :order => sort_clause,
275 @issues = Issue.find :all, :order => sort_clause,
274 :include => [ :author, :status, :tracker, :project, :custom_values ],
276 :include => [ :author, :status, :tracker, :project, :custom_values ],
275 :conditions => search_filter_clause
277 :conditions => search_filter_clause
276
278
277 @options_for_rfpdf ||= {}
279 @options_for_rfpdf ||= {}
278 @options_for_rfpdf[:file_name] = "export.pdf"
280 @options_for_rfpdf[:file_name] = "export.pdf"
279 end
281 end
280
282
281 def move_issues
283 def move_issues
282 @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids]
284 @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids]
283 redirect_to :action => 'list_issues', :id => @project and return unless @issues
285 redirect_to :action => 'list_issues', :id => @project and return unless @issues
284 @projects = []
286 @projects = []
285 # find projects to which the user is allowed to move the issue
287 # find projects to which the user is allowed to move the issue
286 @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role_id)}
288 @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role_id)}
287 # issue can be moved to any tracker
289 # issue can be moved to any tracker
288 @trackers = Tracker.find(:all)
290 @trackers = Tracker.find(:all)
289 if request.post? and params[:new_project_id] and params[:new_tracker_id]
291 if request.post? and params[:new_project_id] and params[:new_tracker_id]
290 new_project = Project.find(params[:new_project_id])
292 new_project = Project.find(params[:new_project_id])
291 new_tracker = Tracker.find(params[:new_tracker_id])
293 new_tracker = Tracker.find(params[:new_tracker_id])
292 @issues.each { |i|
294 @issues.each { |i|
293 # category is project dependent
295 # category is project dependent
294 i.category = nil unless i.project_id == new_project.id
296 i.category = nil unless i.project_id == new_project.id
295 # move the issue
297 # move the issue
296 i.project = new_project
298 i.project = new_project
297 i.tracker = new_tracker
299 i.tracker = new_tracker
298 i.save
300 i.save
299 }
301 }
300 flash[:notice] = l(:notice_successful_update)
302 flash[:notice] = l(:notice_successful_update)
301 redirect_to :action => 'list_issues', :id => @project
303 redirect_to :action => 'list_issues', :id => @project
302 end
304 end
303 end
305 end
304
306
305 # Add a news to @project
307 # Add a news to @project
306 def add_news
308 def add_news
307 @news = News.new(:project => @project)
309 @news = News.new(:project => @project)
308 if request.post?
310 if request.post?
309 @news.attributes = params[:news]
311 @news.attributes = params[:news]
310 @news.author_id = self.logged_in_user.id if self.logged_in_user
312 @news.author_id = self.logged_in_user.id if self.logged_in_user
311 if @news.save
313 if @news.save
312 flash[:notice] = l(:notice_successful_create)
314 flash[:notice] = l(:notice_successful_create)
313 redirect_to :action => 'list_news', :id => @project
315 redirect_to :action => 'list_news', :id => @project
314 end
316 end
315 end
317 end
316 end
318 end
317
319
318 # Show news list of @project
320 # Show news list of @project
319 def list_news
321 def list_news
320 @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC"
322 @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC"
321 render :action => "list_news", :layout => false if request.xhr?
323 render :action => "list_news", :layout => false if request.xhr?
322 end
324 end
323
325
324 def add_file
326 def add_file
325 if request.post?
327 if request.post?
326 # Save the attachment
328 # Save the attachment
327 if params[:attachment][:file].size > 0
329 if params[:attachment][:file].size > 0
328 @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
330 @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
329 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
331 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
330 if @attachment.save
332 if @attachment.save
331 flash[:notice] = l(:notice_successful_create)
333 flash[:notice] = l(:notice_successful_create)
332 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
334 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
333 end
335 end
334 end
336 end
335 end
337 end
336 @versions = @project.versions
338 @versions = @project.versions
337 end
339 end
338
340
339 def list_files
341 def list_files
340 @versions = @project.versions
342 @versions = @project.versions
341 end
343 end
342
344
343 # Show changelog for @project
345 # Show changelog for @project
344 def changelog
346 def changelog
345 @trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true])
347 @trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true])
346 if request.get?
348 if request.get?
347 @selected_tracker_ids = @trackers.collect {|t| t.id.to_s }
349 @selected_tracker_ids = @trackers.collect {|t| t.id.to_s }
348 else
350 else
349 @selected_tracker_ids = params[:tracker_ids].collect { |id| id.to_i.to_s } if params[:tracker_ids] and params[:tracker_ids].is_a? Array
351 @selected_tracker_ids = params[:tracker_ids].collect { |id| id.to_i.to_s } if params[:tracker_ids] and params[:tracker_ids].is_a? Array
350 end
352 end
351 @selected_tracker_ids ||= []
353 @selected_tracker_ids ||= []
352 @fixed_issues = @project.issues.find(:all,
354 @fixed_issues = @project.issues.find(:all,
353 :include => [ :fixed_version, :status, :tracker ],
355 :include => [ :fixed_version, :status, :tracker ],
354 :conditions => [ "issue_statuses.is_closed=? and issues.tracker_id in (#{@selected_tracker_ids.join(',')}) and issues.fixed_version_id is not null", true],
356 :conditions => [ "issue_statuses.is_closed=? and issues.tracker_id in (#{@selected_tracker_ids.join(',')}) and issues.fixed_version_id is not null", true],
355 :order => "versions.effective_date DESC, issues.id DESC"
357 :order => "versions.effective_date DESC, issues.id DESC"
356 ) unless @selected_tracker_ids.empty?
358 ) unless @selected_tracker_ids.empty?
357 @fixed_issues ||= []
359 @fixed_issues ||= []
358 end
360 end
359
361
360 def activity
362 def activity
361 if params[:year] and params[:year].to_i > 1900
363 if params[:year] and params[:year].to_i > 1900
362 @year = params[:year].to_i
364 @year = params[:year].to_i
363 if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13
365 if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13
364 @month = params[:month].to_i
366 @month = params[:month].to_i
365 end
367 end
366 end
368 end
367 @year ||= Date.today.year
369 @year ||= Date.today.year
368 @month ||= Date.today.month
370 @month ||= Date.today.month
369
371
370 @date_from = Date.civil(@year, @month, 1)
372 @date_from = Date.civil(@year, @month, 1)
371 @date_to = (@date_from >> 1)-1
373 @date_to = (@date_from >> 1)-1
372
374
373 @events_by_day = {}
375 @events_by_day = {}
374
376
375 unless params[:show_issues] == "0"
377 unless params[:show_issues] == "0"
376 @project.issues.find(:all, :include => [:author, :status], :conditions => ["issues.created_on>=? and issues.created_on<=?", @date_from, @date_to] ).each { |i|
378 @project.issues.find(:all, :include => [:author, :status], :conditions => ["issues.created_on>=? and issues.created_on<=?", @date_from, @date_to] ).each { |i|
377 @events_by_day[i.created_on.to_date] ||= []
379 @events_by_day[i.created_on.to_date] ||= []
378 @events_by_day[i.created_on.to_date] << i
380 @events_by_day[i.created_on.to_date] << i
379 }
381 }
380 @show_issues = 1
382 @show_issues = 1
381 end
383 end
382
384
383 unless params[:show_news] == "0"
385 unless params[:show_news] == "0"
384 @project.news.find(:all, :conditions => ["news.created_on>=? and news.created_on<=?", @date_from, @date_to] ).each { |i|
386 @project.news.find(:all, :conditions => ["news.created_on>=? and news.created_on<=?", @date_from, @date_to] ).each { |i|
385 @events_by_day[i.created_on.to_date] ||= []
387 @events_by_day[i.created_on.to_date] ||= []
386 @events_by_day[i.created_on.to_date] << i
388 @events_by_day[i.created_on.to_date] << i
387 }
389 }
388 @show_news = 1
390 @show_news = 1
389 end
391 end
390
392
391 unless params[:show_files] == "0"
393 unless params[:show_files] == "0"
392 Attachment.find(:all, :joins => "LEFT JOIN versions ON versions.id = attachments.container_id", :conditions => ["attachments.container_type='Version' and versions.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to] ).each { |i|
394 Attachment.find(:all, :joins => "LEFT JOIN versions ON versions.id = attachments.container_id", :conditions => ["attachments.container_type='Version' and versions.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to] ).each { |i|
393 @events_by_day[i.created_on.to_date] ||= []
395 @events_by_day[i.created_on.to_date] ||= []
394 @events_by_day[i.created_on.to_date] << i
396 @events_by_day[i.created_on.to_date] << i
395 }
397 }
396 @show_files = 1
398 @show_files = 1
397 end
399 end
398
400
399 unless params[:show_documents] == "0"
401 unless params[:show_documents] == "0"
400 Attachment.find(:all, :joins => "LEFT JOIN documents ON documents.id = attachments.container_id", :conditions => ["attachments.container_type='Document' and documents.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to] ).each { |i|
402 Attachment.find(:all, :joins => "LEFT JOIN documents ON documents.id = attachments.container_id", :conditions => ["attachments.container_type='Document' and documents.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to] ).each { |i|
401 @events_by_day[i.created_on.to_date] ||= []
403 @events_by_day[i.created_on.to_date] ||= []
402 @events_by_day[i.created_on.to_date] << i
404 @events_by_day[i.created_on.to_date] << i
403 }
405 }
404 @show_documents = 1
406 @show_documents = 1
405 end
407 end
406
408
407 render :layout => false if request.xhr?
409 render :layout => false if request.xhr?
408 end
410 end
409
411
410 def calendar
412 def calendar
411 if params[:year] and params[:year].to_i > 1900
413 if params[:year] and params[:year].to_i > 1900
412 @year = params[:year].to_i
414 @year = params[:year].to_i
413 if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13
415 if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13
414 @month = params[:month].to_i
416 @month = params[:month].to_i
415 end
417 end
416 end
418 end
417 @year ||= Date.today.year
419 @year ||= Date.today.year
418 @month ||= Date.today.month
420 @month ||= Date.today.month
419
421
420 @date_from = Date.civil(@year, @month, 1)
422 @date_from = Date.civil(@year, @month, 1)
421 @date_to = (@date_from >> 1)-1
423 @date_to = (@date_from >> 1)-1
422 # start on monday
424 # start on monday
423 @date_from = @date_from - (@date_from.cwday-1)
425 @date_from = @date_from - (@date_from.cwday-1)
424 # finish on sunday
426 # finish on sunday
425 @date_to = @date_to + (7-@date_to.cwday)
427 @date_to = @date_to + (7-@date_to.cwday)
426
428
427 @issues = @project.issues.find(:all, :include => :tracker, :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to])
429 @issues = @project.issues.find(:all, :include => :tracker, :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to])
428 render :layout => false if request.xhr?
430 render :layout => false if request.xhr?
429 end
431 end
430
432
431 def gantt
433 def gantt
432 if params[:year] and params[:year].to_i >0
434 if params[:year] and params[:year].to_i >0
433 @year_from = params[:year].to_i
435 @year_from = params[:year].to_i
434 if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12
436 if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12
435 @month_from = params[:month].to_i
437 @month_from = params[:month].to_i
436 else
438 else
437 @month_from = 1
439 @month_from = 1
438 end
440 end
439 else
441 else
440 @month_from ||= (Date.today << 1).month
442 @month_from ||= (Date.today << 1).month
441 @year_from ||= (Date.today << 1).year
443 @year_from ||= (Date.today << 1).year
442 end
444 end
443
445
444 @zoom = (params[:zoom].to_i > 0 and params[:zoom].to_i < 5) ? params[:zoom].to_i : 2
446 @zoom = (params[:zoom].to_i > 0 and params[:zoom].to_i < 5) ? params[:zoom].to_i : 2
445 @months = (params[:months].to_i > 0 and params[:months].to_i < 25) ? params[:months].to_i : 6
447 @months = (params[:months].to_i > 0 and params[:months].to_i < 25) ? params[:months].to_i : 6
446
448
447 @date_from = Date.civil(@year_from, @month_from, 1)
449 @date_from = Date.civil(@year_from, @month_from, 1)
448 @date_to = (@date_from >> @months) - 1
450 @date_to = (@date_from >> @months) - 1
449 @issues = @project.issues.find(:all, :order => "start_date, due_date", :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to])
451 @issues = @project.issues.find(:all, :order => "start_date, due_date", :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to])
450
452
451 if params[:output]=='pdf'
453 if params[:output]=='pdf'
452 @options_for_rfpdf ||= {}
454 @options_for_rfpdf ||= {}
453 @options_for_rfpdf[:file_name] = "gantt.pdf"
455 @options_for_rfpdf[:file_name] = "gantt.pdf"
454 render :template => "projects/gantt.rfpdf", :layout => false
456 render :template => "projects/gantt.rfpdf", :layout => false
455 else
457 else
456 render :template => "projects/gantt.rhtml"
458 render :template => "projects/gantt.rhtml"
457 end
459 end
458 end
460 end
459
461
460 private
462 private
461 # Find project of id params[:id]
463 # Find project of id params[:id]
462 # if not found, redirect to project list
464 # if not found, redirect to project list
463 # Used as a before_filter
465 # Used as a before_filter
464 def find_project
466 def find_project
465 @project = Project.find(params[:id])
467 @project = Project.find(params[:id])
466 @html_title = @project.name
468 @html_title = @project.name
467 rescue
469 rescue
468 redirect_to :action => 'list'
470 redirect_to :action => 'list'
469 end
471 end
470 end
472 end
@@ -1,76 +1,60
1 <h2><%=l(:label_issue_plural)%></h2>
1 <h2><%=l(:label_issue_plural)%></h2>
2 <div class="topright">
2 <div class="topright">
3 <small>
3 <small>
4 <%= l(:label_export_to) %>&nbsp;
4 <%= l(:label_export_to) %>&nbsp;
5 <%= link_to 'CSV', :action => 'export_issues_csv', :id => @project %>,
5 <%= link_to 'CSV', :action => 'export_issues_csv', :id => @project %>,
6 <%= link_to 'PDF', :action => 'export_issues_pdf', :id => @project %>
6 <%= link_to 'PDF', :action => 'export_issues_pdf', :id => @project %>
7 </small>
7 </small>
8 </div>
8 </div>
9
9
10 <div>
10 <%= start_form_tag :action => 'list_issues' %>
11 <%= start_form_tag :action => 'list_issues' %>
11 <table cellpadding=2>
12 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
12 <tr>
13 <%= submit_tag l(:button_apply), :class => "button-small" %>
13 <td valign="bottom"><small><%=l(:field_status)%>:</small><br /><%= search_filter_tag 'status_id', :class => 'select-small' %></td>
14 <td valign="bottom"><small><%=l(:field_tracker)%>:</small><br /><%= search_filter_tag 'tracker_id', :class => 'select-small' %></td>
15 <td valign="bottom"><small><%=l(:field_priority)%>:</small><br /><%= search_filter_tag 'priority_id', :class => 'select-small' %></td>
16 <td valign="bottom"><small><%=l(:field_category)%>:</small><br /><%= search_filter_tag 'category_id', :class => 'select-small' %></td>
17 <td valign="bottom"><small><%=l(:field_fixed_version)%>:</small><br /><%= search_filter_tag 'fixed_version_id', :class => 'select-small' %></td>
18 <td valign="bottom"><small><%=l(:field_author)%>:</small><br /><%= search_filter_tag 'author_id', :class => 'select-small' %></td>
19 <td valign="bottom"><small><%=l(:field_assigned_to)%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td>
20 <td valign="bottom"><small><%=l(:label_subproject_plural)%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>
21 <td valign="bottom">
22 <%= hidden_field_tag 'set_filter', 1 %>
23 <%= submit_tag l(:button_apply), :class => 'button-small' %>
24 </td>
25 <td valign="bottom">
26 <%= link_to l(:button_clear), :action => 'list_issues', :id => @project, :set_filter => 1 %>
27 </td>
28 </tr>
29 </table>
30 <%= end_form_tag %>
14 <%= end_form_tag %>
31
15 </div>
32 &nbsp;
16 &nbsp;
33 <table class="listTableContent">
17 <table class="listTableContent">
34 <tr>
18 <tr>
35 <td colspan="6" align="left"><small><%= check_all_links 'issues_form' %></small></td>
19 <td colspan="6" align="left"><small><%= check_all_links 'issues_form' %></small></td>
36 <td colspan="2" align="right">
20 <td colspan="2" align="right">
37 <small><%= l(:label_per_page) %>:</small>
21 <small><%= l(:label_per_page) %>:</small>
38 <%= start_form_tag %>
22 <%= start_form_tag %>
39 <%= select_tag 'per_page', options_for_select(@results_per_page_options, @results_per_page), :class => 'select-small'%>
23 <%= select_tag 'per_page', options_for_select(@results_per_page_options, @results_per_page), :class => 'select-small'%>
40 <%= submit_tag l(:button_apply), :class => 'button-small'%>
24 <%= submit_tag l(:button_apply), :class => 'button-small'%>
41 <%= end_form_tag %>
25 <%= end_form_tag %>
42 </td>
26 </td>
43 </tr>
27 </tr>
44 </table>
28 </table>
45 <%= start_form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %>
29 <%= start_form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %>
46 <table class="listTableContent">
30 <table class="listTableContent">
47
31
48 <tr class="ListHead">
32 <tr class="ListHead">
49 <td></td>
33 <td></td>
50 <%= sort_header_tag('issues.id', :caption => '#') %>
34 <%= sort_header_tag('issues.id', :caption => '#') %>
51 <%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %>
35 <%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %>
52 <%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %>
36 <%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %>
53 <th><%=l(:field_subject)%></th>
37 <th><%=l(:field_subject)%></th>
54 <%= sort_header_tag('users.lastname', :caption => l(:field_author)) %>
38 <%= sort_header_tag('users.lastname', :caption => l(:field_author)) %>
55 <%= sort_header_tag('issues.created_on', :caption => l(:field_created_on)) %>
39 <%= sort_header_tag('issues.created_on', :caption => l(:field_created_on)) %>
56 <%= sort_header_tag('issues.updated_on', :caption => l(:field_updated_on)) %>
40 <%= sort_header_tag('issues.updated_on', :caption => l(:field_updated_on)) %>
57 </tr>
41 </tr>
58 <% for issue in @issues %>
42 <% for issue in @issues %>
59 <tr class="<%= cycle("odd", "even") %>">
43 <tr class="<%= cycle("odd", "even") %>">
60 <td width="15"><%= check_box_tag "issue_ids[]", issue.id %></td>
44 <td width="15"><%= check_box_tag "issue_ids[]", issue.id %></td>
61 <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td>
45 <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td>
62 <td align="center" style="font-weight:bold;color:#<%= issue.status.html_color %>;"><%= issue.status.name %></font></td>
46 <td align="center" style="font-weight:bold;color:#<%= issue.status.html_color %>;"><%= issue.status.name %></font></td>
63 <td align="center"><%= issue.tracker.name %></td>
47 <td align="center"><%= issue.tracker.name %></td>
64 <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td>
48 <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td>
65 <td align="center"><%= issue.author.display_name %></td>
49 <td align="center"><%= issue.author.display_name %></td>
66 <td align="center"><%= format_time(issue.created_on) %></td>
50 <td align="center"><%= format_time(issue.created_on) %></td>
67 <td align="center"><%= format_time(issue.updated_on) %></td>
51 <td align="center"><%= format_time(issue.updated_on) %></td>
68 </tr>
52 </tr>
69 <% end %>
53 <% end %>
70 </table>
54 </table>
71 <p>
55 <p>
72 <%= pagination_links_full @issue_pages %>
56 <%= pagination_links_full @issue_pages %>
73 [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
57 [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
74 </p>
58 </p>
75 <%= submit_tag l(:button_move) %>
59 <%= submit_tag l(:button_move) %>
76 <%= end_form_tag %> No newline at end of file
60 <%= end_form_tag %>
@@ -1,489 +1,489
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 */
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 /* Edited by Jean-Philippe Lang *>
2 /* Edited by Jean-Philippe Lang *>
3 /**************** Body and tag styles ****************/
3 /**************** Body and tag styles ****************/
4
4
5
5
6 #header * {margin:0; padding:0;}
6 #header * {margin:0; padding:0;}
7 p, ul, ol, li {margin:0; padding:0;}
7 p, ul, ol, li {margin:0; padding:0;}
8
8
9
9
10 body{
10 body{
11 font:76% Verdana,Tahoma,Arial,sans-serif;
11 font:76% Verdana,Tahoma,Arial,sans-serif;
12 line-height:1.4em;
12 line-height:1.4em;
13 text-align:center;
13 text-align:center;
14 color:#303030;
14 color:#303030;
15 background:#e8eaec;
15 background:#e8eaec;
16 margin:0;
16 margin:0;
17 }
17 }
18
18
19
19
20 a{
20 a{
21 color:#467aa7;
21 color:#467aa7;
22 font-weight:bold;
22 font-weight:bold;
23 text-decoration:none;
23 text-decoration:none;
24 background-color:inherit;
24 background-color:inherit;
25 }
25 }
26
26
27 a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;}
27 a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;}
28 a img{border:none;}
28 a img{border:none;}
29
29
30 p{padding:0 0 1em 0;}
30 p{padding:0 0 1em 0;}
31 p form{margin-top:0; margin-bottom:20px;}
31 p form{margin-top:0; margin-bottom:20px;}
32
32
33 img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;}
33 img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;}
34 img.left{float:left; margin:0 12px 5px 0;}
34 img.left{float:left; margin:0 12px 5px 0;}
35 img.center{display:block; margin:0 auto 5px auto;}
35 img.center{display:block; margin:0 auto 5px auto;}
36 img.right{float:right; margin:0 0 5px 12px;}
36 img.right{float:right; margin:0 0 5px 12px;}
37
37
38 /**************** Header and navigation styles ****************/
38 /**************** Header and navigation styles ****************/
39
39
40 #container{
40 #container{
41 width:100%;
41 width:100%;
42 min-width: 800px;
42 min-width: 800px;
43 margin:0;
43 margin:0;
44 padding:0;
44 padding:0;
45 text-align:left;
45 text-align:left;
46 background:#ffffff;
46 background:#ffffff;
47 color:#303030;
47 color:#303030;
48 }
48 }
49
49
50 #header{
50 #header{
51 height:4.5em;
51 height:4.5em;
52 /*width:758px;*/
52 /*width:758px;*/
53 margin:0;
53 margin:0;
54 background:#467aa7;
54 background:#467aa7;
55 color:#ffffff;
55 color:#ffffff;
56 margin-bottom:1px;
56 margin-bottom:1px;
57 }
57 }
58
58
59 #header h1{
59 #header h1{
60 padding:10px 0 0 20px;
60 padding:10px 0 0 20px;
61 font-size:2em;
61 font-size:2em;
62 background-color:inherit;
62 background-color:inherit;
63 color:#fff; /*rgb(152, 26, 33);*/
63 color:#fff; /*rgb(152, 26, 33);*/
64 letter-spacing:-1px;
64 letter-spacing:-1px;
65 font-weight:bold;
65 font-weight:bold;
66 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
66 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
67 }
67 }
68
68
69 #header h2{
69 #header h2{
70 margin:3px 0 0 40px;
70 margin:3px 0 0 40px;
71 font-size:1.5em;
71 font-size:1.5em;
72 background-color:inherit;
72 background-color:inherit;
73 color:#f0f2f4;
73 color:#f0f2f4;
74 letter-spacing:-1px;
74 letter-spacing:-1px;
75 font-weight:normal;
75 font-weight:normal;
76 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
76 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
77 }
77 }
78
78
79 #navigation{
79 #navigation{
80 height:2.2em;
80 height:2.2em;
81 line-height:2.2em;
81 line-height:2.2em;
82 /*width:758px;*/
82 /*width:758px;*/
83 margin:0;
83 margin:0;
84 background:#578bb8;
84 background:#578bb8;
85 color:#ffffff;
85 color:#ffffff;
86 }
86 }
87
87
88 #navigation li{
88 #navigation li{
89 float:left;
89 float:left;
90 list-style-type:none;
90 list-style-type:none;
91 border-right:1px solid #ffffff;
91 border-right:1px solid #ffffff;
92 white-space:nowrap;
92 white-space:nowrap;
93 }
93 }
94
94
95 #navigation li.right {
95 #navigation li.right {
96 float:right;
96 float:right;
97 list-style-type:none;
97 list-style-type:none;
98 border-right:0;
98 border-right:0;
99 border-left:1px solid #ffffff;
99 border-left:1px solid #ffffff;
100 white-space:nowrap;
100 white-space:nowrap;
101 }
101 }
102
102
103 #navigation li a{
103 #navigation li a{
104 display:block;
104 display:block;
105 padding:0px 10px 0px 22px;
105 padding:0px 10px 0px 22px;
106 font-size:0.8em;
106 font-size:0.8em;
107 font-weight:normal;
107 font-weight:normal;
108 /*text-transform:uppercase;*/
108 /*text-transform:uppercase;*/
109 text-decoration:none;
109 text-decoration:none;
110 background-color:inherit;
110 background-color:inherit;
111 color: #ffffff;
111 color: #ffffff;
112 }
112 }
113
113
114 * html #navigation a {width:1%;}
114 * html #navigation a {width:1%;}
115
115
116 #navigation .selected,#navigation a:hover{
116 #navigation .selected,#navigation a:hover{
117 color:#ffffff;
117 color:#ffffff;
118 text-decoration:none;
118 text-decoration:none;
119 background-color: #80b0da;
119 background-color: #80b0da;
120 }
120 }
121
121
122 /**************** Icons links *******************/
122 /**************** Icons links *******************/
123 .picHome { background: url(../images/home.png) no-repeat 4px 50%; }
123 .picHome { background: url(../images/home.png) no-repeat 4px 50%; }
124 .picUser { background: url(../images/user.png) no-repeat 4px 50%; }
124 .picUser { background: url(../images/user.png) no-repeat 4px 50%; }
125 .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; }
125 .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; }
126 .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; }
126 .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; }
127 .picProject { background: url(../images/projects.png) no-repeat 4px 50%; }
127 .picProject { background: url(../images/projects.png) no-repeat 4px 50%; }
128 .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; }
128 .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; }
129 .picHelp { background: url(../images/help.png) no-repeat 4px 50%; }
129 .picHelp { background: url(../images/help.png) no-repeat 4px 50%; }
130
130
131 /**************** Content styles ****************/
131 /**************** Content styles ****************/
132
132
133 html>body #content {
133 html>body #content {
134 height: auto;
134 height: auto;
135 min-height: 500px;
135 min-height: 500px;
136 }
136 }
137
137
138 #content{
138 #content{
139 /*float:right;*/
139 /*float:right;*/
140 /*width:530px;*/
140 /*width:530px;*/
141 width: auto;
141 width: auto;
142 height:500px;
142 height:500px;
143 font-size:0.9em;
143 font-size:0.9em;
144 padding:20px 10px 10px 20px;
144 padding:20px 10px 10px 20px;
145 /*position: absolute;*/
145 /*position: absolute;*/
146 margin-left: 120px;
146 margin-left: 120px;
147 border-left: 1px dashed #c0c0c0;
147 border-left: 1px dashed #c0c0c0;
148
148
149 }
149 }
150
150
151 #content h2{
151 #content h2{
152 display:block;
152 display:block;
153 margin:0 0 16px 0;
153 margin:0 0 16px 0;
154 font-size:1.7em;
154 font-size:1.7em;
155 font-weight:normal;
155 font-weight:normal;
156 letter-spacing:-1px;
156 letter-spacing:-1px;
157 color:#606060;
157 color:#606060;
158 background-color:inherit;
158 background-color:inherit;
159 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
159 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
160 }
160 }
161
161
162 #content h2 a{font-weight:normal;}
162 #content h2 a{font-weight:normal;}
163 #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;}
163 #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;}
164 #content a:hover,#subcontent a:hover{text-decoration:underline;}
164 #content a:hover,#subcontent a:hover{text-decoration:underline;}
165 #content ul,#content ol{margin:0 5px 16px 35px;}
165 #content ul,#content ol{margin:0 5px 16px 35px;}
166 #content dl{margin:0 5px 10px 25px;}
166 #content dl{margin:0 5px 10px 25px;}
167 #content dt{font-weight:bold; margin-bottom:5px;}
167 #content dt{font-weight:bold; margin-bottom:5px;}
168 #content dd{margin:0 0 10px 15px;}
168 #content dd{margin:0 0 10px 15px;}
169
169
170
170
171 /***********************************************/
171 /***********************************************/
172
172
173 /*
173 /*
174 form{
174 form{
175 padding:15px;
175 padding:15px;
176 margin:0 0 20px 0;
176 margin:0 0 20px 0;
177 border:1px solid #c0c0c0;
177 border:1px solid #c0c0c0;
178 background-color:#CEE1ED;
178 background-color:#CEE1ED;
179 width:600px;
179 width:600px;
180 }
180 }
181 */
181 */
182
182
183 form {
183 form {
184 display: inline;
184 display: inline;
185 }
185 }
186
186
187 .noborder {
187 .noborder {
188 border:0px;
188 border:0px;
189 background-color:#fff;
189 background-color:#fff;
190 width:100%;
190 width:100%;
191 }
191 }
192
192
193 textarea {
193 textarea {
194 padding:0;
194 padding:0;
195 margin:0;
195 margin:0;
196 }
196 }
197
197
198 blockquote {
198 blockquote {
199 padding-left: 6px;
199 padding-left: 6px;
200 border-left: 2px solid #ccc;
200 border-left: 2px solid #ccc;
201 }
201 }
202
202
203 input {
203 input {
204 vertical-align: middle;
204 vertical-align: middle;
205 }
205 }
206
206
207 input.button-small
207 input.button-small
208 {
208 {
209 font-size: 0.8em;
209 font-size: 0.8em;
210 }
210 }
211
211
212 select {
212 select {
213 vertical-align: middle;
213 vertical-align: middle;
214 }
214 }
215
215
216 select.select-small
216 .select-small
217 {
217 {
218 border: 1px solid #7F9DB9;
218 border: 1px solid #7F9DB9;
219 padding: 1px;
219 padding: 1px;
220 font-size: 0.8em;
220 font-size: 0.8em;
221 }
221 }
222
222
223 .active-filter
223 .active-filter
224 {
224 {
225 background-color: #F9FA9E;
225 background-color: #F9FA9E;
226
226
227 }
227 }
228
228
229 label {
229 label {
230 font-weight: bold;
230 font-weight: bold;
231 font-size: 1em;
231 font-size: 1em;
232 }
232 }
233
233
234 fieldset {
234 fieldset {
235 border:1px solid #7F9DB9;
235 border:1px solid #7F9DB9;
236 padding: 6px;
236 padding: 6px;
237 }
237 }
238
238
239 legend {
239 legend {
240 color: #505050;
240 color: #505050;
241
241
242 }
242 }
243
243
244 .required {
244 .required {
245 color: #bb0000;
245 color: #bb0000;
246 }
246 }
247
247
248 table.listTableContent {
248 table.listTableContent {
249 border:1px solid #578bb8;
249 border:1px solid #578bb8;
250 width:99%;
250 width:99%;
251 border-collapse: collapse;
251 border-collapse: collapse;
252 }
252 }
253
253
254 table.listTableContent td {
254 table.listTableContent td {
255 padding:2px;
255 padding:2px;
256 }
256 }
257
257
258 tr.ListHead {
258 tr.ListHead {
259 background-color:#467aa7;
259 background-color:#467aa7;
260 color:#FFFFFF;
260 color:#FFFFFF;
261 text-align:center;
261 text-align:center;
262 }
262 }
263
263
264 tr.ListHead a {
264 tr.ListHead a {
265 color:#FFFFFF;
265 color:#FFFFFF;
266 text-decoration:underline;
266 text-decoration:underline;
267 }
267 }
268
268
269 .odd {
269 .odd {
270 background-color:#f0f1f2;
270 background-color:#f0f1f2;
271 }
271 }
272 .even {
272 .even {
273 background-color: #fff;
273 background-color: #fff;
274 }
274 }
275
275
276 table.reportTableContent {
276 table.reportTableContent {
277 border:1px solid #c0c0c0;
277 border:1px solid #c0c0c0;
278 width:99%;
278 width:99%;
279 border-collapse: collapse;
279 border-collapse: collapse;
280 }
280 }
281
281
282 table.reportTableContent td {
282 table.reportTableContent td {
283 padding:2px;
283 padding:2px;
284 }
284 }
285
285
286 table.calenderTable {
286 table.calenderTable {
287 border:1px solid #578bb8;
287 border:1px solid #578bb8;
288 width:99%;
288 width:99%;
289 border-collapse: collapse;
289 border-collapse: collapse;
290 }
290 }
291
291
292 table.calenderTable td {
292 table.calenderTable td {
293 border:1px solid #578bb8;
293 border:1px solid #578bb8;
294 }
294 }
295
295
296 hr { border:none; border-bottom: dotted 1px #c0c0c0; }
296 hr { border:none; border-bottom: dotted 1px #c0c0c0; }
297
297
298
298
299 /**************** Sidebar styles ****************/
299 /**************** Sidebar styles ****************/
300
300
301 #subcontent{
301 #subcontent{
302 position: absolute;
302 position: absolute;
303 left: 0px;
303 left: 0px;
304 width:110px;
304 width:110px;
305 padding:20px 20px 10px 5px;
305 padding:20px 20px 10px 5px;
306 }
306 }
307
307
308 #subcontent h2{
308 #subcontent h2{
309 display:block;
309 display:block;
310 margin:0 0 5px 0;
310 margin:0 0 5px 0;
311 font-size:1.0em;
311 font-size:1.0em;
312 font-weight:bold;
312 font-weight:bold;
313 text-align:left;
313 text-align:left;
314 color:#606060;
314 color:#606060;
315 background-color:inherit;
315 background-color:inherit;
316 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
316 font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
317 }
317 }
318
318
319 #subcontent p{margin:0 0 16px 0; font-size:0.9em;}
319 #subcontent p{margin:0 0 16px 0; font-size:0.9em;}
320
320
321 /**************** Menublock styles ****************/
321 /**************** Menublock styles ****************/
322
322
323 .menublock{margin:0 0 20px 8px; font-size:0.8em;}
323 .menublock{margin:0 0 20px 8px; font-size:0.8em;}
324 .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;}
324 .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;}
325 .menublock li a{font-weight:bold; text-decoration:none;}
325 .menublock li a{font-weight:bold; text-decoration:none;}
326 .menublock li a:hover{text-decoration:none;}
326 .menublock li a:hover{text-decoration:none;}
327 .menublock li ul{margin:0; font-size:1em; font-weight:normal;}
327 .menublock li ul{margin:0; font-size:1em; font-weight:normal;}
328 .menublock li ul li{margin-bottom:0;}
328 .menublock li ul li{margin-bottom:0;}
329 .menublock li ul a{font-weight:normal;}
329 .menublock li ul a{font-weight:normal;}
330
330
331 /**************** Searchbar styles ****************/
331 /**************** Searchbar styles ****************/
332
332
333 #searchbar{margin:0 0 20px 0;}
333 #searchbar{margin:0 0 20px 0;}
334 #searchbar form fieldset{margin-left:10px; border:0 solid;}
334 #searchbar form fieldset{margin-left:10px; border:0 solid;}
335
335
336 #searchbar #s{
336 #searchbar #s{
337 height:1.2em;
337 height:1.2em;
338 width:110px;
338 width:110px;
339 margin:0 5px 0 0;
339 margin:0 5px 0 0;
340 border:1px solid #a0a0a0;
340 border:1px solid #a0a0a0;
341 }
341 }
342
342
343 #searchbar #searchbutton{
343 #searchbar #searchbutton{
344 width:auto;
344 width:auto;
345 padding:0 1px;
345 padding:0 1px;
346 border:1px solid #808080;
346 border:1px solid #808080;
347 font-size:0.9em;
347 font-size:0.9em;
348 text-align:center;
348 text-align:center;
349 }
349 }
350
350
351 /**************** Footer styles ****************/
351 /**************** Footer styles ****************/
352
352
353 #footer{
353 #footer{
354 clear:both;
354 clear:both;
355 /*width:758px;*/
355 /*width:758px;*/
356 padding:5px 0;
356 padding:5px 0;
357 margin:0;
357 margin:0;
358 font-size:0.9em;
358 font-size:0.9em;
359 color:#f0f0f0;
359 color:#f0f0f0;
360 background:#467aa7;
360 background:#467aa7;
361 }
361 }
362
362
363 #footer p{padding:0; margin:0; text-align:center;}
363 #footer p{padding:0; margin:0; text-align:center;}
364 #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;}
364 #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;}
365 #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;}
365 #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;}
366
366
367 /**************** Misc classes and styles ****************/
367 /**************** Misc classes and styles ****************/
368
368
369 .splitcontentleft{float:left; width:49%;}
369 .splitcontentleft{float:left; width:49%;}
370 .splitcontentright{float:right; width:49%;}
370 .splitcontentright{float:right; width:49%;}
371 .clear{clear:both;}
371 .clear{clear:both;}
372 .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;}
372 .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;}
373 .hide{display:none;}
373 .hide{display:none;}
374 .textcenter{text-align:center;}
374 .textcenter{text-align:center;}
375 .textright{text-align:right;}
375 .textright{text-align:right;}
376 .important{color:#f02025; background-color:inherit; font-weight:bold;}
376 .important{color:#f02025; background-color:inherit; font-weight:bold;}
377
377
378 .box{
378 .box{
379 margin:0 0 20px 0;
379 margin:0 0 20px 0;
380 padding:10px;
380 padding:10px;
381 border:1px solid #c0c0c0;
381 border:1px solid #c0c0c0;
382 background-color:#fafbfc;
382 background-color:#fafbfc;
383 color:#505050;
383 color:#505050;
384 line-height:1.5em;
384 line-height:1.5em;
385 }
385 }
386
386
387 a.close-icon {
387 a.close-icon {
388 display:block;
388 display:block;
389 margin-top:3px;
389 margin-top:3px;
390 overflow:hidden;
390 overflow:hidden;
391 width:12px;
391 width:12px;
392 height:12px;
392 height:12px;
393 background-repeat: no-repeat;
393 background-repeat: no-repeat;
394 cursor:hand;
394 cursor:hand;
395 cursor:pointer;
395 cursor:pointer;
396 background-image:url('../images/close.png');
396 background-image:url('../images/close.png');
397 }
397 }
398
398
399 a.close-icon:hover {
399 a.close-icon:hover {
400 background-image:url('../images/close_hl.png');
400 background-image:url('../images/close_hl.png');
401 }
401 }
402
402
403 .rightbox{
403 .rightbox{
404 background: #fafbfc;
404 background: #fafbfc;
405 border: 1px solid #c0c0c0;
405 border: 1px solid #c0c0c0;
406 float: right;
406 float: right;
407 padding: 8px;
407 padding: 8px;
408 position: relative;
408 position: relative;
409 margin: 0 5px 5px;
409 margin: 0 5px 5px;
410 }
410 }
411
411
412 .layout-active {
412 .layout-active {
413 background: #ECF3E1;
413 background: #ECF3E1;
414 }
414 }
415
415
416 .block-receiver {
416 .block-receiver {
417 border:1px dashed #c0c0c0;
417 border:1px dashed #c0c0c0;
418 margin-bottom: 20px;
418 margin-bottom: 20px;
419 padding: 15px 0 15px 0;
419 padding: 15px 0 15px 0;
420 }
420 }
421
421
422 .mypage-box {
422 .mypage-box {
423 margin:0 0 20px 0;
423 margin:0 0 20px 0;
424 color:#505050;
424 color:#505050;
425 line-height:1.5em;
425 line-height:1.5em;
426 }
426 }
427
427
428 .handle {
428 .handle {
429 cursor: move;
429 cursor: move;
430 }
430 }
431
431
432 .topright{
432 .topright{
433 position: absolute;
433 position: absolute;
434 right: 25px;
434 right: 25px;
435 top: 100px;
435 top: 100px;
436 }
436 }
437
437
438 .login {
438 .login {
439 width: 50%;
439 width: 50%;
440 text-align: left;
440 text-align: left;
441 }
441 }
442
442
443 img.calendar-trigger {
443 img.calendar-trigger {
444 cursor: pointer;
444 cursor: pointer;
445 vertical-align: middle;
445 vertical-align: middle;
446 margin-left: 4px;
446 margin-left: 4px;
447 }
447 }
448
448
449 #history h4 {
449 #history h4 {
450 font-size: 1em;
450 font-size: 1em;
451 margin-bottom: 12px;
451 margin-bottom: 12px;
452 margin-top: 20px;
452 margin-top: 20px;
453 font-weight: normal;
453 font-weight: normal;
454 border-bottom: dotted 1px #c0c0c0;
454 border-bottom: dotted 1px #c0c0c0;
455 }
455 }
456
456
457 #history p {
457 #history p {
458 margin-left: 34px;
458 margin-left: 34px;
459 }
459 }
460
460
461 /***** CSS FORM ******/
461 /***** CSS FORM ******/
462 .tabular p{
462 .tabular p{
463 margin: 0;
463 margin: 0;
464 padding: 5px 0 8px 0;
464 padding: 5px 0 8px 0;
465 padding-left: 180px; /*width of left column containing the label elements*/
465 padding-left: 180px; /*width of left column containing the label elements*/
466 height: 1%;
466 height: 1%;
467 }
467 }
468
468
469 .tabular label{
469 .tabular label{
470 font-weight: bold;
470 font-weight: bold;
471 float: left;
471 float: left;
472 margin-left: -180px; /*width of left column*/
472 margin-left: -180px; /*width of left column*/
473 width: 175px; /*width of labels. Should be smaller than left column to create some right
473 width: 175px; /*width of labels. Should be smaller than left column to create some right
474 margin*/
474 margin*/
475 }
475 }
476
476
477 .error {
477 .error {
478 color: #cc0000;
478 color: #cc0000;
479 }
479 }
480
480
481
481
482 /*.threepxfix class below:
482 /*.threepxfix class below:
483 Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents.
483 Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents.
484 to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html
484 to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html
485 */
485 */
486
486
487 * html .threepxfix{
487 * html .threepxfix{
488 margin-left: 3px;
488 margin-left: 3px;
489 } No newline at end of file
489 }
General Comments 0
You need to be logged in to leave comments. Login now