Skip to content
Snippets Groups Projects
Commit 13253a22 authored by pabois's avatar pabois
Browse files

wip export site

parent ac68916d
No related branches found
No related tags found
No related merge requests found
......@@ -62,9 +62,10 @@ module Admin::ApplicationHelper
def prepare_for_github(html, university)
text = html.to_s
text = sanitize text,
tags: %w(table a figure img figcaption i em b strong p h2 h3 h4 h5 h6 blockquote br),
attributes: %w(href alt title target rel src srcset width height)
tags: %w(table figure figcaption strong em b i u p code pre tt samp kbd var sub sup dfn cite big small address hr br span h1 h2 h3 h4 h5 h6 ul ol li dl dt dd abbr acronym a img blockquote del ins),
attributes: %w(rel href src srcset width height alt cite datetime title class name xml:lang abbr style target)
text.gsub! "\r", ''
text.gsub! "\n", ' '
text.gsub! "/rails/active_storage", "#{university.url}/rails/active_storage"
......
......@@ -31,7 +31,7 @@ class Github
file: local_path,
sha: file_sha(path)
true
rescue
rescue => e
false
end
......
......@@ -16,7 +16,7 @@
<td><%= link_to website, [:admin, website] %></td>
<td><%= link_to website.domain_url, website.domain_url, target: :_blank %></td>
<td><%= I18n.t("activerecord.attributes.communication/website.about_#{website.about_type}") %></td>
<td><%= website.about %></td>
<td><%= link_to website.about, [:admin, website.about] %></td>
<td class="text-end">
<div class="btn-group" role="group">
<%= edit_link website %>
......
......@@ -51,6 +51,7 @@ en:
all: All posts
attributes:
communication/website:
about: About
about_: Independent website (no specific subject)
about_Education::School: School website
about_Research::Journal: Journal website
......
......@@ -51,6 +51,7 @@ fr:
all: Toutes les actualités
attributes:
communication/website:
about: Sujet du site
about_: Site indépendant (aucun sujet)
about_Education::School: Site d'école
about_Research::Journal: Site de revue scientifique
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment