Skip to content

Commit

Permalink
change data in excel (consuldemocracy#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
vairix-garbeletche committed Jun 15, 2018
1 parent 511b445 commit 49ffe9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/custom/admin/proposals/download_excel.axlsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
wb = xlsx_package.workbook
wb.add_worksheet(name: t("proposals.excel.title")) do |sheet|
sheet.add_row [t("proposals.excel.link"), t("proposals.excel.title"), t("proposals.excel.summary"), t("proposals.excel.text"), t("proposals.excel.video_link"),
sheet.add_row [t("proposals.excel.link"), t("proposals.excel.type"), t("proposals.excel.title"), t("proposals.excel.summary"), t("proposals.excel.text"), t("proposals.excel.video_link"),
t("proposals.excel.documents_link"), t("proposals.excel.image_absolute_url"), t("proposals.excel.documents_absolute_url"),
t("proposals.excel.action_plan"), t("proposals.excel.categories"), t("proposals.excel.full_name"),
t("proposals.excel.comments_count"), t("proposals.excel.support_count")]
@proposals.each do |proposal|
sheet.add_row [
proposal_url(proposal), proposal.title, proposal.summary, ActionView::Base.full_sanitizer.sanitize(proposal.description),
proposal_url(proposal), proposal.is_proposal? ? 'Propuesta' : 'Consulta ciudadana', proposal.title, proposal.summary, ActionView::Base.full_sanitizer.sanitize(proposal.description),
proposal.video_url ? "#{@url}#{proposal.video_url}" : '', proposal.external_url,
proposal.image ? "#{@url}#{proposal.image.attachment.url}" : '', proposal.documents.map { |doc| "#{@url}#{doc.attachment.url},"}.join(', '),
proposal.geozone ? proposal.geozone.name : '', proposal.tags.pluck(:name).join(', '), proposal.author.username,
Expand Down
1 change: 1 addition & 0 deletions config/locales/custom/es/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ es:
require_permission: No tiene los permisos para realizar esta acción
excel:
title: Propuestas
type: Tipo
link: Enlace
title: Título
summary: Resumen
Expand Down

0 comments on commit 49ffe9d

Please sign in to comment.