From 776d5ce554cdf0229c0a90fae0321e3506a5d849 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 5 Jan 2007 19:10:57 +0000 Subject: [PATCH] XHTML compliance improvements git-svn-id: http://redmine.rubyforge.org/svn/trunk@150 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/show.rhtml | 4 +- app/views/layouts/base.rhtml | 4 +- app/views/projects/activity.rhtml | 19 +++++---- app/views/projects/calendar.rhtml | 18 ++++----- app/views/projects/gantt.rhtml | 55 ++++++-------------------- app/views/projects/list.rhtml | 6 +-- app/views/projects/list_issues.rhtml | 9 ++--- app/views/projects/show.rhtml | 12 ++---- app/views/queries/_filters.rhtml | 40 +++++++++---------- app/views/reports/_details.rhtml | 10 ++--- app/views/reports/_simple.rhtml | 8 ++-- app/views/repositories/_dir_list.rhtml | 2 +- app/views/repositories/browse.rhtml | 13 +++--- app/views/repositories/diff.rhtml | 8 ++-- app/views/repositories/revision.rhtml | 13 +++--- app/views/repositories/revisions.rhtml | 15 ++++--- app/views/repositories/show.rhtml | 8 ++-- public/stylesheets/application.css | 25 ++++++++++++ 18 files changed, 136 insertions(+), 133 deletions(-) diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index a6fb46604..208e5be12 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -7,8 +7,8 @@
- - + + diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 0f7be43a3..56ffbcf80 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -49,7 +49,7 @@ <% end %> -
  • <%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :target => "new", :class => "picHelp" %>
  • +
  • <%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :onclick => "window.open(this.href); return false;", :class => "picHelp" %>
  • <% if loggedin? %>
  • <%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "picUser" %>
  • @@ -136,7 +136,7 @@ diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml index 9a4a07aff..cb7a3bfe1 100644 --- a/app/views/projects/activity.rhtml +++ b/app/views/projects/activity.rhtml @@ -2,16 +2,19 @@
    - <%= start_form_tag %> +<%= start_form_tag %>

    <%= select_month(@month, :prefix => "month", :discard_type => true) %> <%= select_year(@year, :prefix => "year", :discard_type => true) %>

    - <%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0 %> <%=l(:label_issue_plural)%>
    - <%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0 %> <%=l(:label_news_plural)%>
    - <%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0 %> <%=l(:label_attachment_plural)%>
    - <%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0 %> <%=l(:label_document_plural)%>
    -

    <%= submit_tag l(:button_apply), :class => 'button-small' %>

    - <%= end_form_tag %> -
    +

    + <%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0, :id => nil %> <%=l(:label_issue_plural)%>
    + <%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0, :id => nil %> <%=l(:label_news_plural)%>
    + <%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0, :id => nil %> <%=l(:label_attachment_plural)%>
    + <%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0, :id => nil %> <%=l(:label_document_plural)%> +

    +

    <%= submit_tag l(:button_apply), :class => 'button-small' %>

    +<%= end_form_tag %> +
    + <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>

    <%= day_name(day.cwday) %> <%= day.day %>

    <%=l(:field_status)%> :<%= @issue.status.name %><%=l(:field_priority)%> :<%= @issue.priority.name %><%=l(:field_status)%> :<%= @issue.status.name %><%=l(:field_priority)%> :<%= @issue.priority.name %>
    <%=l(:field_assigned_to)%> :<%= @issue.assigned_to ? @issue.assigned_to.name : "-" %>
    - -
    + <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }}, {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))} %> - <%= start_form_tag :action => 'calendar', :id => @project %> <%= select_month(@month, :prefix => "month", :discard_type => true) %> <%= select_year(@year, :prefix => "year", :discard_type => true) %> <%= submit_tag l(:button_submit), :class => "button-small" %> - <%= end_form_tag %> + <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }}, {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))} @@ -23,6 +22,7 @@
    + <%= end_form_tag %>
    @@ -30,19 +30,19 @@ <% 1.upto(7) do |d| %> - + <% end %> - + <% day = @date_from while day <= @date_to if day.cwday == 1 %> <% end %> - - <%= '' if day.cwday >= 7 and day!=@date_to %> + <%= '' if day.cwday >= 7 and day!=@date_to %> <% day = day + 1 end %> diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml index 6199107c5..33d87e6dc 100644 --- a/app/views/projects/gantt.rhtml +++ b/app/views/projects/gantt.rhtml @@ -9,12 +9,14 @@
    <%= day_name(d) %><%= day_name(d) %>
    <%= day.cweek %>"> -

    <%= day==Date.today ? "#{day.day}" : day.day %>

    +
    "> +

    <%= day==Date.today ? "#{day.day}" : day.day %>

    <% day_issues = [] @issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day } day_issues.each do |i| %> @@ -56,7 +56,7 @@ while day <= @date_to <%= link_to "#{i.tracker.name} ##{i.id}", { :controller => 'issues', :action => 'show', :id => i }, :title => "#{i.subject}" %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %>
    <% end %>
    <%= start_form_tag %> - +

    + <%= l(:label_months_from) %> <%= select_month(@month_from, :prefix => "month", :discard_type => true) %> <%= select_year(@year_from, :prefix => "year", :discard_type => true) %> <%= hidden_field_tag 'zoom', @zoom %> <%= submit_tag l(:button_submit), :class => "button-small" %> +

    <%= end_form_tag %>
    @@ -33,38 +35,6 @@

    - - <% zoom = 1 @zoom.times { zoom = zoom * 2 } @@ -89,13 +59,13 @@ g_height = [(20 * @issues.length + 6), 206].max t_height = g_height + headers_heigth %> - +
    - <% for project in @projects %> "> - + + <% end %> diff --git a/app/views/projects/list_issues.rhtml b/app/views/projects/list_issues.rhtml index 7ccc59611..e71a7b2d3 100644 --- a/app/views/projects/list_issues.rhtml +++ b/app/views/projects/list_issues.rhtml @@ -57,7 +57,7 @@ <% for issue in @issues %> "> - + @@ -74,12 +74,11 @@ <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon file' %>, <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'pic picPdf' %> - -<%= submit_tag l(:button_move), :class => "button-small" %> -<%= end_form_tag %> +

    <%= submit_tag l(:button_move), :class => "button-small" %>   <%= pagination_links_full @issue_pages %> [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] - +

    +<%= end_form_tag %> <% end %> <% end %> \ No newline at end of file diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml index 518ec38ff..be5b67abb 100644 --- a/app/views/projects/show.rhtml +++ b/app/views/projects/show.rhtml @@ -27,7 +27,7 @@ <% end %> -
    <%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %>
    +

    <%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %>

    @@ -51,12 +51,6 @@

    <%=l(:label_news_latest)%>

    <%= render :partial => 'news/news', :collection => @news %> -
    <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %>
    +

    <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %>

    - - - - - - - + \ No newline at end of file diff --git a/app/views/queries/_filters.rhtml b/app/views/queries/_filters.rhtml index 4cfce899f..4c20d86ff 100644 --- a/app/views/queries/_filters.rhtml +++ b/app/views/queries/_filters.rhtml @@ -1,5 +1,5 @@ -
    <%= l(:label_filter_plural) %> -
    +
    -
    -
    +
    +
    <% # # Tasks subjects @@ -113,7 +83,7 @@ end %>
    -
     
    +
     
    <% # # Months headers @@ -124,7 +94,7 @@ height = (show_weeks ? header_heigth : header_heigth + g_height) @months.times do width = ((month_f >> 1) - month_f) * zoom - 1 %> -
    +
    <%= link_to "#{month_f.year}-#{month_f.month}", { :year => month_f.year, :month => month_f.month, :zoom => @zoom, :months => @months }, :title => "#{month_name(month_f.month)} #{month_f.year}"%>
    <% @@ -147,7 +117,7 @@ if show_weeks week_f = @date_from + (7 - @date_from.cwday + 1) width = (7 - @date_from.cwday + 1) * zoom-1 %> -
     
    +
     
    <% left = left + width+1 end %> @@ -155,7 +125,7 @@ if show_weeks while week_f <= @date_to width = (week_f + 6 <= @date_to) ? 7 * zoom -1 : (@date_to - week_f + 1) * zoom-1 %> -
    +
    <%= week_f.cweek if width >= 16 %>
    <% @@ -175,7 +145,7 @@ if show_days (@date_to - @date_from + 1).to_i.times do width = zoom - 1 %> -
    5 %>" class="m_bg"> +
    5 %>" class="gantt_hdr"> <%= day_name(wday)[0,1] %>
    <% @@ -236,7 +206,6 @@ end %> -
    <%= link_to ('« ' + l(:label_previous)), :year => (@date_from << @months).year, :month => (@date_from << @months).month, :zoom => @zoom, :months => @months %> <%= link_to (l(:label_next) + ' »'), :year => (@date_from >> @months).year, :month => (@date_from >> @months).month, :zoom => @zoom, :months => @months %>
    \ No newline at end of file diff --git a/app/views/projects/list.rhtml b/app/views/projects/list.rhtml index 59580797d..0723a7081 100644 --- a/app/views/projects/list.rhtml +++ b/app/views/projects/list.rhtml @@ -9,9 +9,9 @@
    <%= link_to project.name, :action => 'show', :id => project %> - <%=h project.description %> - <%= format_date(project.created_on) %> + <%= link_to project.name, :action => 'show', :id => project %><%=h project.description %><%= format_date(project.created_on) %>
    <%= check_box_tag "issue_ids[]", issue.id %><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %> <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %> <%= issue.tracker.name %>
    <%= issue.status.name %>
    +
    diff --git a/app/views/reports/_details.rhtml b/app/views/reports/_details.rhtml index 1d791e0c7..e52538f73 100644 --- a/app/views/reports/_details.rhtml +++ b/app/views/reports/_details.rhtml @@ -4,13 +4,13 @@ <% col_width = 70 / (@statuses.length+3) %>
    - +
    <% query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.each do |filter| %> <% field = filter[0] options = filter[1] %> id="tr_<%= field %>"> - - - <% end %>
    + <%= check_box_tag 'fields[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %> - <%= select_tag "operators[#{field}]", options_for_select(operators_for_select(options[:type]), query.operator_for(field)), :onchange => "toggle_operator('#{field}');", :class => "select-small", :style => "vertical-align: top;" %> + + <%= select_tag "operators[#{field}]", options_for_select(operators_for_select(options[:type]), query.operator_for(field)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :class => "select-small", :style => "vertical-align: top;" %> -
    +
    <% case options[:type] when :list, :list_optional, :list_status %> - 1 %> name="values[<%= field %>][]" id="values_<%= field %>" class="select-small" style="vertical-align: top;"> <%= options_for_select options[:values], query.values_for(field) %> <%= link_to_function image_tag('expand'), "toggle_multi_select('#{field}');" %> <% when :date, :date_past %> - <%= text_field_tag "values[#{field}][]", query.values_for(field), :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %> + <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %> <% when :text %> - <%= text_field_tag "values[#{field}][]", query.values_for(field), :size => 30, :class => "select-small" %> + <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small" %> <% end %>
    +
    - + <% for status in @statuses %> - + <% end %> - - - + + + <% for row in rows %> diff --git a/app/views/reports/_simple.rhtml b/app/views/reports/_simple.rhtml index 24cbd9b7f..1e66210f9 100644 --- a/app/views/reports/_simple.rhtml +++ b/app/views/reports/_simple.rhtml @@ -3,10 +3,10 @@ <% else %>
    <%= status.name %>
    <%= status.name %>
    <%=l(:label_open_issues_plural)%><%=l(:label_closed_issues_plural)%><%=l(:label_total)%><%=l(:label_open_issues_plural)%><%=l(:label_closed_issues_plural)%><%=l(:label_total)%>
    - - - - + + + + <% for row in rows %> diff --git a/app/views/repositories/_dir_list.rhtml b/app/views/repositories/_dir_list.rhtml index 635fba528..7b80c5f1f 100644 --- a/app/views/repositories/_dir_list.rhtml +++ b/app/views/repositories/_dir_list.rhtml @@ -20,4 +20,4 @@ end %>
    <%=l(:label_open_issues_plural)%><%=l(:label_closed_issues_plural)%><%=l(:label_total)%><%=l(:label_open_issues_plural)%><%=l(:label_closed_issues_plural)%><%=l(:label_total)%>
    -

    <%= l(:label_total) %>: <%= human_size(total_size) %>

    \ No newline at end of file +

    <%= l(:label_total) %>: <%= human_size(total_size) %>

    \ No newline at end of file diff --git a/app/views/repositories/browse.rhtml b/app/views/repositories/browse.rhtml index 92ad8478b..cdd4e6882 100644 --- a/app/views/repositories/browse.rhtml +++ b/app/views/repositories/browse.rhtml @@ -1,11 +1,14 @@ -<%= stylesheet_link_tag "scm" %> -
    <%= start_form_tag %> -<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> -<%= submit_tag 'OK' %> +

    <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> +<%= submit_tag 'OK' %>

    +<%= end_form_tag %>

    <%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %>

    -<%= render :partial => 'dir_list' %> \ No newline at end of file +<%= render :partial => 'dir_list' %> + +<% content_for :header_tags do %> +<%= stylesheet_link_tag "scm" %> +<% end %> \ No newline at end of file diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml index d4350cb61..0060e7867 100644 --- a/app/views/repositories/diff.rhtml +++ b/app/views/repositories/diff.rhtml @@ -1,7 +1,5 @@

    <%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %>

    -<%= stylesheet_link_tag "scm" %> - @@ -52,4 +50,8 @@ line_num_r = 0 %> <% end %> -
    @<%= @rev %>@<%= @rev_to %>
    \ No newline at end of file + + +<% content_for :header_tags do %> +<%= stylesheet_link_tag "scm" %> +<% end %> \ No newline at end of file diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml index 19e980825..f616a0180 100644 --- a/app/views/repositories/revision.rhtml +++ b/app/views/repositories/revision.rhtml @@ -1,9 +1,8 @@ -<%= stylesheet_link_tag "scm" %> -
    <%= start_form_tag %> -<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> -<%= submit_tag 'OK' %> +

    <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> +<%= submit_tag 'OK' %>

    +<%= end_form_tag %>

    <%= l(:label_revision) %> <%= @revision.identifier %>

    @@ -32,4 +31,8 @@ <% end %> -

    <%= lwr(:label_modification, @revision.paths.length) %>

    \ No newline at end of file +

    <%= lwr(:label_modification, @revision.paths.length) %>

    + +<% content_for :header_tags do %> +<%= stylesheet_link_tag "scm" %> +<% end %> \ No newline at end of file diff --git a/app/views/repositories/revisions.rhtml b/app/views/repositories/revisions.rhtml index 851c85858..6ab8df400 100644 --- a/app/views/repositories/revisions.rhtml +++ b/app/views/repositories/revisions.rhtml @@ -1,9 +1,8 @@ -<%= stylesheet_link_tag "scm" %> -
    <%= start_form_tag %> -<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> -<%= submit_tag 'OK' %> +

    <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %> +<%= submit_tag 'OK' %>

    +<%= end_form_tag %>

    <%= render :partial => 'navigation', :locals => { :path => @path, :kind => @entry.kind, :revision => @rev } %>

    @@ -29,10 +28,14 @@ <%= link_to revision.identifier, :action => 'revision', :id => @project, :rev => revision.identifier %> <%=h revision.author %> <%= format_time(revision.time) %> -<%= textilizable(revision.message) %> +<%= textilizable(revision.message) %> <%= link_to 'Diff', :action => 'diff', :id => @project, :path => @path, :rev => revision.identifier if @entry.is_file? && revision != @revisions.last %> <% end %> -

    <%= lwr(:label_modification, @revisions.length) %>

    \ No newline at end of file +

    <%= lwr(:label_modification, @revisions.length) %>

    + +<% content_for :header_tags do %> +<%= stylesheet_link_tag "scm" %> +<% end %> \ No newline at end of file diff --git a/app/views/repositories/show.rhtml b/app/views/repositories/show.rhtml index 4c95f8844..9c2adc929 100644 --- a/app/views/repositories/show.rhtml +++ b/app/views/repositories/show.rhtml @@ -1,5 +1,3 @@ -<%= stylesheet_link_tag "scm" %> -

    <%= l(:label_repository) %>

    <%= l(:label_revision_plural) %>

    @@ -12,4 +10,8 @@

    <%= l(:label_browse) %>

    -<%= render :partial => 'dir_list' %> \ No newline at end of file +<%= render :partial => 'dir_list' %> + +<% content_for :header_tags do %> +<%= stylesheet_link_tag "scm" %> +<% end %> \ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 2b1c53794..9663491c8 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -505,6 +505,31 @@ font-size: 0.8em; font-size: 1em; } +/***** Gantt chart *****/ +.gantt_hdr { + position:absolute; + top:0; + height:16px; + border-top: 1px solid #c0c0c0; + border-bottom: 1px solid #c0c0c0; + border-right: 1px solid #c0c0c0; + text-align: center; + overflow: hidden; +} + +.task { + position: absolute; + height:8px; + font-size:0.8em; + color:#888; + background:#aaa; + padding:0; + margin:0; + line-height:0.8em; +} + +.task_late { background:#f66; } +.task_done { background:#66f; } /***** CSS FORM ******/ .tabular p{