|
|
|
@ -1,42 +1,41 @@
|
|
|
|
|
<div id="tags">
|
|
|
|
|
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 -->
|
|
|
|
|
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
|
|
|
|
|
<% if object_flag == '3' %>
|
|
|
|
|
|
|
|
|
|
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
|
|
|
|
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %>
|
|
|
|
|
<% if object_flag == '3' %>
|
|
|
|
|
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
|
|
|
|
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
|
|
|
|
|
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<span> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name-issue'} %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<div id="tags_show_issue">
|
|
|
|
|
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="put-tag-form-issue" style="display: none">
|
|
|
|
|
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
|
|
|
|
:update => "tags_show",
|
|
|
|
|
:complete => '$("#put-tag-form-issue").hide();' do |f| %>
|
|
|
|
|
<%= f.text_field :name ,:id => "name-issue",:size=>"30",:require=>true %>
|
|
|
|
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
|
|
|
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
|
|
|
|
<%= f.submit "add"%>
|
|
|
|
|
<%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").hide();'%>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<div id="tags_show_issue">
|
|
|
|
|
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="put-tag-form-issue" style="display: none">
|
|
|
|
|
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
|
|
|
|
:update => "tags_show",
|
|
|
|
|
:complete => '$("#put-tag-form-issue").hide();' do |f| %>
|
|
|
|
|
<%= f.text_field :name ,:id => "name-issue",:size=>"30" %>
|
|
|
|
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
|
|
|
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
|
|
|
|
<%= f.submit "add"%>
|
|
|
|
|
<%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").hide();'%>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
|
|
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
|
|
|
|
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span><%= image_tag("/images/sidebar/tags.png") %></span>
|
|
|
|
|
<span class="font_title_tag"><%= l(:label_tag) %>:</span>
|
|
|
|
|
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'name'} %>
|
|
|
|
|
<span><%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'name'} %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="tags_show">
|
|
|
|
|
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
|
|
|
|
</div>
|
|
|
|
@ -44,7 +43,7 @@
|
|
|
|
|
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
|
|
|
|
:update => "tags_show",
|
|
|
|
|
:complete => '$("#put-tag-form").hide();' do |f| %>
|
|
|
|
|
<%= f.text_field :name ,:id => "name",:size=>"28"%>
|
|
|
|
|
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true%>
|
|
|
|
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
|
|
|
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
|
|
|
|
<%= f.submit "add"%>
|
|
|
|
|