From: Akira Saito Date: Sat, 23 Aug 2014 10:28:24 +0000 (+0900) Subject: relates menu design adjust X-Git-Tag: 0.0.6~15 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4820abfaa96a30f28252368e6b78b2f7a3a3774f;p=quickedit%2Fquick_edit.git relates menu design adjust --- diff --git a/app/views/hooks/_context.erb b/app/views/hooks/_context.erb index 9e03ed7..0147921 100644 --- a/app/views/hooks/_context.erb +++ b/app/views/hooks/_context.erb @@ -34,23 +34,30 @@
  • <%= link_to l(:label_add_relates_to, :id=>second_issue.id), issue_relations_path(:issue_id => first_issue.id, :relation => {:relation_type => :relates, :issue_to_id => second_issue.id} ), + :remote => false, :method => :post, :action => :create, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:label_relation_new), :class => 'icon', :style => 'background-image: url("/images/link.png")' %>
  • <% end %> - <% first_issue.relations.each do |relation| %> -
    - <% other_issue = relation.other_issue(first_issue) %> -
  • <%= link_to "#{other_issue.subject}", - relation_path(relation, :back_url => @back), - :remote => false, - :method => :delete, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:label_relation_delete), - :class => 'icon', - :style => 'background-image: url("/images/link_break.png");' if User.current.allowed_to?(:manage_issue_relations, @project) %>
  • + <% if @issues.size == 1 && first_issue.relations.any? %> +
    + <% first_issue.relations.each do |relation| %> + <% other_issue = relation.other_issue(first_issue) %> + <% if User.current.allowed_to?(:manage_issue_relations, @project) %> +
  • <%= link_to l(relation.label_for(first_issue)) + " \##{other_issue.id}", + relation_path(relation), + :remote => false, + :method => :delete, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:label_relation_delete), + :class => 'icon', + :style => 'background-image: url("/images/link_break.png");' %>
  • + <% end %> + <% end %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 004bb13..6eadf4c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -6,7 +6,7 @@ en: button_quick_edit: Quick Edit label_edit_subject: Subject - label_add_relates_to: 'Relates : #%{id}' + label_add_relates_to: 'Relate #%{id}' text_edit_confirm: Please, input a new value. text_is_required: can't be empty. text_none_is_invalid: can't specify the 'none'.its a special value. diff --git a/config/locales/ja.yml b/config/locales/ja.yml index df6cc46..cf79551 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -5,7 +5,7 @@ ja: button_quick_edit: Quick Edit label_edit_subject: 題名 - label_add_relates_to: '関連 : #%{id}' + label_add_relates_to: '関連 #%{id}' text_edit_confirm: 新しい値を入力してください。 text_is_required: 値の入力が必要です。 text_none_is_invalid: noneは特別な意味を持つため指定できません。