diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b82cb906d..54b05b012 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -728,7 +728,7 @@ module ApplicationHelper end def other_formats_links(&block) - concat('

'.html_safe + l(:label_export_to)) + concat('

'.html_safe + l(:label_export_to)) yield Redmine::Views::OtherFormatsBuilder.new(self) concat('

'.html_safe) end diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index 3c20bb501..a6afea438 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -28,31 +28,15 @@

<%= render :partial => 'attachments/form', :locals => {:container => @issue} %> -

-

- - - <%= watchers_checkboxes(@issue, @available_watchers) %> - - - <%= link_to l(:label_search_for_watchers), - {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, - :remote => true, - :method => 'get' %> - -

-
- - +
<%= f.hidden_field :lock_version %> <%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id]%> - + <%= l(:button_submit) %> -



<%#= submit_tag l(:button_submit) %> - <%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' %> + <%= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fl ml10"}%> <% end %>
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index e381ece02..81da316b7 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -95,5 +95,23 @@
<%= render :partial => 'issues/attributes' %>
+
+
+ + + + <%= link_to "", + {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, + :remote => true, + :method => 'get', + :class => "pic_sch mt5 ml5" %> + + <%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %> +
+ + <%= watchers_checkboxes(@issue, @available_watchers) %> + +
+
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %> <% end %> \ No newline at end of file diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 5b88920df..13b0c09f0 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -31,11 +31,8 @@
-
- -
<% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 56c4f0815..9c1ce60ab 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -2,108 +2,126 @@

<%= l(:label_issue_plural) %>

<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %> -
-
- <%= @issue.project.name %> > - <%= "#" + @issue.project_index %> -
-
-
- <%= link_to image_tag(url_to_avatar(@issue.author),:width => 46,:height => 46), user_path(@issue.author), :class => "ping_dispic" %> -
-
-

- <%= @issue.subject %><%= get_issue_typevalue(@issue.tracker_id) %>


-
-

<%= @issue.author %> - <% if @issue.created_on != @issue.updated_on %> - 更新于 <%= format_time(@issue.created_on).html_safe %> - <% else %> - 添加于 <%= format_time(@issue.updated_on).html_safe %> - <% end %> -

- 'action_menu' %> -
-
- <% if @issue.description? || @issue.attachments.any? -%> - <% if @issue.description? %> - <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> - <%= textilizable @issue, :description, :attachments => @issue.attachments %> - <% end %> +
+ -
- - - <%= link_to_attachment_project @issue, :thumbnails => true %>
- <% end -%> - <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> -
-
- -
- <%= issue_fields_rows do |rows| %> -
    +
    +
    + <%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %> +
    +
    +

    + <%= @issue.subject %> + <%= get_issue_typevalue(@issue.tracker_id) %> +


    -
  • * 状态  : 

    <%= @issue.status.name %>

    -
  • -
    -
  • * 优先级  : 

    <%= @issue.priority.name %> -
  • - <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> -
  •  指派给  : 

    <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "-" %>
  • - <% end %> -
    - <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> -
  •  目标版本  : 

    <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "-") %>
  • +

    <%= @issue.author %> + <% if @issue.created_on != @issue.updated_on %> + 更新于 <%= format_time(@issue.created_on).html_safe %> + <% else %> + 添加于 <%= format_time(@issue.updated_on).html_safe %> + <% end %> +

    + + 'action_menu' %> +
    +
    + <% if @issue.description? || @issue.attachments.any? -%> + <% if @issue.description? %> + <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> + <%= textilizable @issue, :description, :attachments => @issue.attachments %> <% end %> +
    +
    + + + <%= link_to_attachment_project @issue, :thumbnails => true %>
    + <% end -%> + <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> +
    -
-
    - <% unless @issue.disabled_core_fields.include?('start_date') %> -
  •  开始日期  : 

    <%= format_date(@issue.start_date) %>

  • - <% end %> -
    - <% unless @issue.disabled_core_fields.include?('due_date') %> -
  •  计划完成日期  : 

    <%= format_date(@issue.due_date) %> -
  • - <% end %> -
    - <% unless @issue.disabled_core_fields.include?('estimated_hours') %> + +
    + <%= issue_fields_rows do |rows| %> +
      -
    •  预期时间  : 

      <%= l_hours(@issue.estimated_hours) %> -
    • +
    • * 状态  : 

      - <% end %> +

      <%= @issue.status.name %>

      +
    • +
      +
    • * 优先级  : 

      + <%= @issue.priority.name %> +
    • +
      + <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> +
    •  指派给  : 

      + <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "-" %> +
    • + <% end %> +
      + <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> +
    •  目标版本  : 

      + <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "-") %> +
    • + <% end %> +
      +
    +
      + <% unless @issue.disabled_core_fields.include?('start_date') %> +
    •  开始日期  : 

      + +

      <%= format_date(@issue.start_date) %>

    • + <% end %> +
      + <% unless @issue.disabled_core_fields.include?('due_date') %> +
    •  计划完成日期  : 

      + <%= format_date(@issue.due_date) %> +
    • + <% end %> +
      + <% unless @issue.disabled_core_fields.include?('estimated_hours') %> + +
    •  预期时间  : 

      + <%= l_hours(@issue.estimated_hours) %> +
    • + + <% end %> +
      + <% unless @issue.disabled_core_fields.include?('done_ratio') %> +
    •  % 完成  : 

      + <%= @issue.done_ratio %>% +
    • + <% end %> +
      +
    + <% end %> + <%#= render_custom_fields_rows(@issue) %> + <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> +
    +
    - <% unless @issue.disabled_core_fields.include?('done_ratio') %> -
  •  % 完成  : 

    <%= @issue.done_ratio %>% -
  • - <% end %> + <%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>
    -
- <% end %> - <%#= render_custom_fields_rows(@issue) %> - <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> -
-
- <%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %> -
-
-
- <% if @issue.editable? %> +
+ +
+ <% if @issue.editable? %>
<%= render :partial => 'edit' %>
<% end %> - +
<% if @changesets.present? %>
-

<%=l(:label_associated_revisions)%>

- <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %> +

<%= l(:label_associated_revisions) %>

+ <%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>
<% end %> - +
<% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> - <%= f.link_to 'PDF' %> + <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> + <%= f.link_to 'PDF' %> <% end %> <% content_for :sidebar do %> - <%= render :partial => 'issues/sidebar' %> - - <% if User.current.allowed_to?(:add_issue_watchers, @project) || - (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %> -
- <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %> -
- <% end %> + <%= render :partial => 'issues/sidebar' %> +
+ <% if User.current.allowed_to?(:add_issue_watchers, @project) || + (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %> +
+ <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %> +
+ <% end %> <% end %> <% content_for :header_tags do %>