|
|
@ -255,26 +255,17 @@ module ApplicationHelper
|
|
|
|
end
|
|
|
|
end
|
|
|
|
classes = (ancestors.empty? ? 'root' : 'child')
|
|
|
|
classes = (ancestors.empty? ? 'root' : 'child')
|
|
|
|
s << "<li class='project-table'><div class='#{classes}'>"
|
|
|
|
s << "<li class='project-table'><div class='#{classes}'>"
|
|
|
|
if params[:project_type] == "0"
|
|
|
|
if project.try(:project_type) == Project::ProjectType_project
|
|
|
|
s << h(block_given? ? yield(project) : project.name)
|
|
|
|
s << h(block_given? ? yield(project) : project.name)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# if @project.project_type == 1
|
|
|
|
if project.try(:project_type) == Project::ProjectType_project
|
|
|
|
# unless Course.find_by_extra(@project.identifier).nil?
|
|
|
|
|
|
|
|
# unless Course.find_by_extra(@project.identifier).tea_id == User.current.id
|
|
|
|
|
|
|
|
# s << "<span style = 'float: right;'>"
|
|
|
|
|
|
|
|
# s << join_in_course(@project, User.current)#, ['whiteButton'])
|
|
|
|
|
|
|
|
# s << "</span>"
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
if params[:project_type] == "0"
|
|
|
|
|
|
|
|
unless User.current.member_of?(@project)
|
|
|
|
unless User.current.member_of?(@project)
|
|
|
|
s << "<span style = 'float: right;'>"
|
|
|
|
s << "<span style = 'float: right;'>"
|
|
|
|
s << watcher_link(@project, User.current)#, ['whiteButton'])
|
|
|
|
s << watcher_link(@project, User.current)#, ['whiteButton'])
|
|
|
|
s << "</span>"
|
|
|
|
s << "</span>"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
s << (render :partial => 'projects/project', :locals => {:project => project}).to_s
|
|
|
|
s << (render :partial => 'projects/project', :locals => {:project => project}).to_s
|
|
|
|
else
|
|
|
|
else
|
|
|
|
s << (render :partial => 'projects/course', :locals => {:project => project}).to_s
|
|
|
|
s << (render :partial => 'projects/course', :locals => {:project => project}).to_s
|
|
|
|