diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 075371b..749d989 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -9,7 +9,8 @@ def admin_index authorize Template #institutional templates - @dmptemplates_own = Template.own_institutional_templates(current_user.org_id) + #@dmptemplates_own = Template.own_institutional_templates(current_user.org_id) + @dmptemplates_own = Template.where(org_id: current_user.org_id) #funders templates @dmptemplates_funders = Template.funders_templates end diff --git a/app/views/templates/admin_index.html.erb b/app/views/templates/admin_index.html.erb index 9af877a..76edad8 100644 --- a/app/views/templates/admin_index.html.erb +++ b/app/views/templates/admin_index.html.erb @@ -16,13 +16,13 @@
| <% last_updated = org_template.updated_at %> - <% org_template.phases.each do |phase|%> - <% if phase.versions.any? then%> - <% phase.versions.each do |version| %> - <% if org_template.updated_at.to_date < version.updated_at.to_date then %> - <% last_updated = version.updated_at %> - <%end%> - <%end%> - <%end%> - <%end%> <%= l last_updated.to_date, :formats => :short %> |