add some images and let the tag function more userful.

This commit is contained in:
william 2013-08-01 22:25:30 +08:00
parent ee0d8ecb95
commit ffbe6da73e
5 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,10 @@
<div id="tags" class="inf_user_context"> <div id="tags">
<%= tag('img', {:src => "/images/sidebar/tags.png"}, false, false) %>
<label><%= l(:label_tag) %>:</label> <label><%= l(:label_tag) %>:</label>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 --> <!-- 1代表是user类型 2代表是project类型 3代表是issue类型 -->
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 --> <!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<% if object_flag == '3' %> <% if object_flag == '3' %>
<%= toggle_link (image_tag "/images/add.png"), 'put-tag-form-issue', {:focus => 'name'} %> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form-issue', {:focus => 'name'} %>
<div id="tags_show_issue"> <div id="tags_show_issue">
<%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> <%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div> </div>
@ -15,13 +16,13 @@
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "add"%> <%= f.submit "add"%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%> <%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").hide();'%>
<% end %> <% end %>
</div> </div>
</div> </div>
<% else %> <% else %>
<%= toggle_link (image_tag "/images/add.png"), 'put-tag-form', {:focus => 'name'} %> <%= toggle_link (image_tag "/images/sidebar/add.png"), 'put-tag-form', {:focus => 'name'} %>
<div id="tags_show"> <div id="tags_show">
<%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %> <%= render :partial => "layouts/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div> </div>

View File

@ -17,7 +17,7 @@
cursor: pointer; cursor: pointer;
} }
</style> </style>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 --> <!-- 1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求-->
<% @tags = obj.reload.tag_list %> <% @tags = obj.reload.tag_list %>
<% if non_list_all and (@tags.size > 0) %> <% if non_list_all and (@tags.size > 0) %>

View File

@ -10,7 +10,6 @@
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<h3><%=l(:label_overview)%></h3> <h3><%=l(:label_overview)%></h3>
<% unless @project.active? %> <% unless @project.active? %>

View File

@ -2,7 +2,7 @@
<ul> <ul>
<% for rt in related_tags %> <% for rt in related_tags %>
<li> <li>
<%= link_to image_tag("/images/add.png"),:action => "add_tag",:remote => true,:tag => rt %> <%= link_to image_tag("/images/sidebar/add.png"),:action => "add_tag",:remote => true,:tag => rt %>
<%= rt %> <%= rt %>
<% @issue_size = Issue.tagged_with("#{rt}").size %> <% @issue_size = Issue.tagged_with("#{rt}").size %>
<% @project_size = Project.tagged_with(rt).size %> <% @project_size = Project.tagged_with(rt).size %>

View File

@ -2,7 +2,7 @@
<ul> <ul>
<% for sg in selected_tags %> <% for sg in selected_tags %>
<li> <li>
<%= link_to image_tag("/images/delete.png"),:action => "delete_tag",:remote=>true,:tag => sg %> <%= link_to image_tag("/images/sidebar/minus.png"),:action => "delete_tag",:remote=>true,:tag => sg %>
<%= sg %> <%= sg %>
<% @issue_size = Issue.tagged_with("#{sg}").size %> <% @issue_size = Issue.tagged_with("#{sg}").size %>
<% @project_size = Project.tagged_with(sg).size %> <% @project_size = Project.tagged_with(sg).size %>