项目类型图标

This commit is contained in:
huang 2015-04-17 10:13:47 +08:00
parent 258a023abd
commit 54b81bdfb3
4 changed files with 14 additions and 5 deletions

View File

@ -49,6 +49,16 @@ module ApplicationHelper
end end
end end
def get_project_type_css(value)
if value == 1
"pr_friend"
elsif value == 1
"pr_keyan"
else
"pr_kafa"
end
end
# Time 2015-03-24 16:38:05 # Time 2015-03-24 16:38:05
# Author lizanle # Author lizanle
# Description after save后需要进行资源记录的更新 # Description after save后需要进行资源记录的更新

View File

@ -53,7 +53,7 @@
<% end %> <% end %>
<% if options[:author] %> <% if options[:author] %>
<span class="author" title="<%= attachment.author%>"> <span class="author" title="<%= attachment.author%>">
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange ml20" %>, <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
<%= format_time(attachment.created_on) %> <%= format_time(attachment.created_on) %>
</span> </span>
<% end %> <% end %>

View File

@ -10,6 +10,6 @@
<!--退出项目--> <!--退出项目-->
<% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %> <% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %>
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %> <%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
<%= link_to "<span class='pr_friend'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> <%= link_to "<span class='#{get_project_type_css(@project_type_new)}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
<% end %> <% end %>
</div> </div>

View File

@ -205,7 +205,7 @@
<div class="cl"></div> <div class="cl"></div>
</div><!--项目标签 end--> </div><!--项目标签 end-->
</div> </div>
</div>
<div id="RSide" class="fl"> <div id="RSide" class="fl">
<%= render_flash_messages %> <%= render_flash_messages %>
@ -213,7 +213,6 @@
<%= call_hook :view_layouts_base_content %> <%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div> <div style="clear:both;"></div>
</div> </div>
</div>
<div style="clear:both;"></div> <div style="clear:both;"></div>
<div class="cl"></div> <div class="cl"></div>
<%= render :partial => 'layouts/new_footer'%> <%= render :partial => 'layouts/new_footer'%>