From 3473cf3736def2777b0cc0b3cfedbd44beb35f81 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Mon, 2 Mar 2015 17:45:15 -0500 Subject: [PATCH] add desc and link to xls and csv exporters --- app/models/map.rb | 4 +++- app/views/maps/show.xls.erb | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/map.rb b/app/models/map.rb index 280fcef3..0364b4de 100644 --- a/app/models/map.rb +++ b/app/models/map.rb @@ -84,12 +84,14 @@ class Map < ActiveRecord::Base def to_csv(options = {}) CSV.generate(options) do |csv| - csv << ["id", "name", "metacode", "user.name", "permission", "synapses"] + csv << ["id", "name", "metacode", "desc", "link", "user.name", "permission", "synapses"] self.topics.each do |topic| csv << [ topic.id, topic.name, topic.metacode.name, + topic.desc, + topic.link, topic.user.name, topic.permission, topic.synapses_csv("text") diff --git a/app/views/maps/show.xls.erb b/app/views/maps/show.xls.erb index 55b89552..d00dd36e 100644 --- a/app/views/maps/show.xls.erb +++ b/app/views/maps/show.xls.erb @@ -3,6 +3,8 @@ ID Name Metacode + Description + Link Username Permission Synapses @@ -12,6 +14,8 @@ <%= topic.id %> <%= topic.name %> <%= topic.metacode.name %> + <%= topic.desc %> + <%= topic.link %> <%= topic.user.name %> <%= topic.permission %> <% topic.synapses_csv.each do |s_text| %>