dev_aliyun
p31729568 5 years ago
parent bfb796d04b
commit ebaf2390dc

@ -55,11 +55,11 @@ class ProjectPackage < ActiveRecord::Base
end end
def category def category
project_package_category.name project_package_category.en_name
end end
def category_name def category_name
project_package_category.en_name project_package_category.name
end end
def visitable? def visitable?

@ -31,7 +31,7 @@
<% can_manage = @type == 'p_package' && (admin_or_business? || current_user.id == @user.id) %> <% can_manage = @type == 'p_package' && (admin_or_business? || current_user.id == @user.id) %>
<div class="project-package-item <%= can_manage ? 'with-operator' : '' %> project-package-<%= object.id %>"> <div class="project-package-item <%= can_manage ? 'with-operator' : '' %> project-package-<%= object.id %>">
<div class="item-image"> <div class="item-image">
<%= image_tag("educoder/project_packages/#{object.category_name}.png") %> <%= image_tag("educoder/project_packages/#{object.category}.png") %>
</div> </div>
<div class="item-body"> <div class="item-body">
<div class="item-head"> <div class="item-head">
@ -54,7 +54,7 @@
</div> </div>
</div> </div>
<div class="item-category"> <div class="item-category">
<div class="item-category-item"><%= object.category %></div> <div class="item-category-item"><%= object.category_name %></div>
</div> </div>
<div class="item-other"> <div class="item-other">
<div class="item-group item-other-visit"> <div class="item-group item-other-visit">

Loading…
Cancel
Save