parent
dead08a0d6
commit
3b4bf8b99d
@ -0,0 +1,10 @@
|
|||||||
|
class OrganizationController < ApplicationController
|
||||||
|
layout 'project_base'
|
||||||
|
def index
|
||||||
|
#@projects = Project.find_by_sql("SELECT * FROM projects WHERE id IN (select MAX(id) from projects GROUP BY enterprise_name)")
|
||||||
|
@organizations = Organization.all
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -1,6 +0,0 @@
|
|||||||
class OrganizationsController < ApplicationController
|
|
||||||
layout 'project_base'
|
|
||||||
def index
|
|
||||||
@projects = Project.find_by_sql("SELECT * FROM projects WHERE id IN (select MAX(id) from projects GROUP BY enterprise_name)")
|
|
||||||
end
|
|
||||||
end
|
|
@ -0,0 +1,31 @@
|
|||||||
|
<title>
|
||||||
|
<%= l(:label_all_enterprises) %>
|
||||||
|
</title>
|
||||||
|
<div class="content_syqy">
|
||||||
|
<div class="list">
|
||||||
|
<%= l(:label_all_enterprises) %>
|
||||||
|
</div>
|
||||||
|
<div class="syqy_box">
|
||||||
|
<% if @organizations.empty? %>
|
||||||
|
<h3>
|
||||||
|
<%= l(:label_enterprise_nil) %>
|
||||||
|
</h3>
|
||||||
|
<% else %>
|
||||||
|
<% @organizations.each do |organization| %>
|
||||||
|
<% unless organization.name.blank? %>
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
|
<img src="/images/organization_logo.jpg" width="30" height="30" alt="#{project.enterprise_name}" />
|
||||||
|
<%= link_to organization.name, home_path(:organization => organization.id) %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
<div class="school-index">
|
||||||
|
<ul id="schoollist" style="line-height: 25px"></ul>
|
||||||
|
</div>
|
||||||
|
<% html_title(l(:label_enterprise_all)) -%>
|
@ -1,23 +0,0 @@
|
|||||||
<title><%= l(:label_all_enterprises) %></title>
|
|
||||||
<div class="content_syqy">
|
|
||||||
<div class="list"><%= l(:label_all_enterprises) %></div>
|
|
||||||
<div class="syqy_box">
|
|
||||||
<% if @projects.count == 0 %>
|
|
||||||
<h3><%= l(:label_enterprise_nil) %></h3>
|
|
||||||
<% else %>
|
|
||||||
<% @projects.each do |organization| %>
|
|
||||||
<% unless organization.enterprise_name.blank? %>
|
|
||||||
<ul>
|
|
||||||
<li ><img src="/images/organization_logo.jpg" width="30" height="30" alt="#{project.enterprise_name}" />
|
|
||||||
<%= link_to organization.enterprise_name, home_path(:organization => organization) %></li>
|
|
||||||
</ul>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="clear: both"></div>
|
|
||||||
<div class="school-index">
|
|
||||||
<ul id="schoollist" style="line-height: 25px"></ul>
|
|
||||||
</div>
|
|
||||||
<% html_title(l(:label_enterprise_all)) -%>
|
|
Loading…
Reference in new issue