forked from External/greenlight
change terms from txt to markdown
This commit is contained in:
@ -99,5 +99,4 @@ a {
|
||||
.terms {
|
||||
overflow: scroll;
|
||||
height: 55vh;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
@ -25,7 +25,22 @@ module ApplicationHelper
|
||||
Rails.configuration.allow_user_signup
|
||||
end
|
||||
|
||||
# Determines if the BigBlueButton endpoint is the default.
|
||||
def bigbluebutton_endpoint_default?
|
||||
Rails.configuration.bigbluebutton_endpoint_default == Rails.configuration.bigbluebutton_endpoint
|
||||
end
|
||||
|
||||
# Parses markdown for rendering.
|
||||
def markdown(text)
|
||||
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
|
||||
no_intra_emphasis: true,
|
||||
fenced_code_blocks: true,
|
||||
disable_indented_code_blocks: true,
|
||||
autolink: true,
|
||||
tables: true,
|
||||
underline: true,
|
||||
highlight: true)
|
||||
|
||||
markdown.render(text).html_safe
|
||||
end
|
||||
end
|
||||
|
@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="terms">
|
||||
<p><%= Rails.configuration.terms %></p>
|
||||
<%= markdown(Rails.configuration.terms) %>
|
||||
</div>
|
||||
<div class="btn-list text-right pt-8">
|
||||
<%= button_to t("terms.accept"), terms_path, params: {accept: true}, class: "btn btn-primary btn-space" %>
|
||||
|
Reference in New Issue
Block a user