项目首页增加新建项目按钮
This commit is contained in:
parent
6a2e269395
commit
c10eeb1c01
|
@ -175,18 +175,15 @@ module ProjectsHelper
|
|||
render_project_nested_lists(projects) do |project|
|
||||
#Modified by young
|
||||
if project.try(:project_type) == Project::ProjectType_course
|
||||
|
||||
# modified by longjun
|
||||
# never use unless and else
|
||||
# unless project.is_public == 1
|
||||
|
||||
if project.is_public != 1
|
||||
s = "<span class='private_project'>#{l(:lable_private)}</span>".html_safe
|
||||
else
|
||||
s = "".html_safe
|
||||
end
|
||||
# end longjun
|
||||
|
||||
# modified by Longjun
|
||||
s += link_to_project(project, {},
|
||||
:class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}").html_safe
|
||||
|
@ -194,7 +191,6 @@ module ProjectsHelper
|
|||
else
|
||||
# modified by longjun
|
||||
# unless project.is_public
|
||||
|
||||
if !project.is_public
|
||||
# end longjun
|
||||
s = "<span class='private_project'>#{l(:lable_private)}</span>".html_safe
|
||||
|
|
|
@ -56,8 +56,15 @@
|
|||
<div style="clear:both"></div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
<h3 style="margin-left: 5px; color: #e8770d;">
|
||||
<strong>热门项目</strong>
|
||||
</h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;">
|
||||
<% if User.current.logged? %>
|
||||
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type =>( @project_type||=0)}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to l(:label_more), { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% #projects = find_miracle_project(10, 3) %>
|
||||
|
|
Loading…
Reference in New Issue