Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added org abbreviation to 'Guidance' sections and added customized ex… #1347

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

briri
Copy link
Contributor

@briri briri commented Apr 4, 2018

screen shot 2018-04-04 at 1 02 18 pm

<% if example_answer.present? %>
<dt><%= _('Example answer') %></dt>
<dd><%= raw example_answer.text %><dd>
<% end %>
<% if guidance.present? %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if is no longer needed

</span>
<div class="panel-body">
<%= raw annotation.text %>
<% annotations = [question.first_example_answer] %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is workable but I don't think is understandable at a glance. A more simplistic approach would be question.annotations.where(type: Annotation.types[:example_answer]) which would bring both example answers in one go. Obviously we should move data access to the controllers or model

@@ -1,4 +1,4 @@
<%# locals: { question, answer, readonly, locking } %>
<%# locals: { template, question, answer, readonly, locking } %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this partial is used also for previewing a template, did you test if still works?

@jollopre jollopre merged commit f094e64 into DMPRoadmap:master Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants