diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 37c6800..7ce8920 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -19,7 +19,7 @@ end @templates_own = current_templates.values #funders templates - @templates_funders = Org.funders.collect{|o| o.templates } #Template.funders_templates + @templates_funders = []#Org.funders.collect{|o| o.templates } #Template.funders_templates end diff --git a/app/views/dmptemplates/_add_question.html.erb b/app/views/dmptemplates/_add_question.html.erb deleted file mode 100644 index b9bbfc8..0000000 --- a/app/views/dmptemplates/_add_question.html.erb +++ /dev/null @@ -1,183 +0,0 @@ - - -<% @new_question = Question.new %> -<% @new_question.number = section.questions.count + 1 %> - - -<%= form_for @new_question, :url => {:action => "admin_createquestion"}, :html => {:id => "new_question_#{section.id}"} do |f| %> -<%= f.hidden_field :section_id, :value => section.id %> -
| <%= t("org_admin.questions.question_number_label")%> | -<%= f.number_field :number, :in => 1..50, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.questions.number_help_text") %> - - - | -
| <%= t("org_admin.questions.question_text_label")%> | -<%= f.text_area :text, :rows => "5", :id => "new_question_text_#{section.id}" %> - - | -
| <%= t("org_admin.questions.answer_format_label")%> | -<%= f.hidden_field :section_id, :value => section.id, :class => "section_id" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%= f.select :question_format_id,
- #options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title(t("helpers.text_area")).id),
- # the above was the line but it doesn't work because in the DB
- # the QuestionFormat title is in English (Text area)
- # but the above uses the Fr translation and so gets a nil
- options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title("Text area").id),
- {}, :id => "new-select-format-#{section.id}"%>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "question_format_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_format_help_text_html"))%>
-
-
- |
-
| <%= t("org_admin.questions.suggested_or_example_answer_label")%> | -
- <% suggested_answer = @new_question.suggested_answers.build %>
- <%= f.fields_for :suggested_answers, suggested_answer do |s|%>
- <%= s.hidden_field :organisation_id, :value => current_user.organisation.id %>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "suggested_answer_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.suggested_answer_help_text_html"))%>
-
-
-
-
- |
-
| <%= t("org_admin.questions.guidance_label")%> | -
- <%= text_area_tag("new-question-guidance", "", class: "tinymce") %>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "question_guidance_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_guidance_help_text_html"))%>
-
-
-
- |
-
| <%= t("org_admin.questions.themes_label")%> | -
- <%= f.collection_select(:theme_ids,
- Theme.all.order("title"),
- :id, :title, {:prompt => false, :include_blank => t('helpers.none')}, {:multiple => true})%>
-
-
- <%= link_to( image_tag("help_button.png"), "#", :class => "question_themes_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.questions.question_themes_help_text_html"))%>
-
-
-
- |
-