add desc and link to xls and csv exporters

This commit is contained in:
Devin Howard 2015-03-02 17:45:15 -05:00
parent a525f9d89e
commit 3473cf3736
2 changed files with 7 additions and 1 deletions

View file

@ -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")

View file

@ -3,6 +3,8 @@
<th>ID</th>
<th>Name</th>
<th>Metacode</th>
<th>Description</th>
<th>Link</th>
<th>Username</th>
<th>Permission</th>
<th>Synapses</th>
@ -12,6 +14,8 @@
<td><%= topic.id %></td>
<td><%= topic.name %></td>
<td><%= topic.metacode.name %></td>
<td><%= topic.desc %></td>
<td><%= topic.link %></td>
<td><%= topic.user.name %></td>
<td><%= topic.permission %></td>
<% topic.synapses_csv.each do |s_text| %>