Actualizar plugin Questions a 1.0.2 light
This commit is contained in:
parent
b9e569d03f
commit
b37d1305f1
64 changed files with 394 additions and 229 deletions
|
@ -6,7 +6,7 @@
|
|||
<%= f.text_field :subject, :id => "question_subject", :size => 120%>
|
||||
</p>
|
||||
<p><label><%= l(:label_questions_section) %></label><br />
|
||||
<%= f.select :section_id, options_from_collection_for_select(QuestionsSection.where(:project_id => @project),:id, :name, f.object.section_id), :style => "width: 80%;", :required => true %>
|
||||
<%= f.select :section_id, options_from_collection_for_select(QuestionsSection.where(:project_id => @project).sorted, :id, :name, f.object.section_id), :style => "width: 80%;", :required => true %>
|
||||
<%= javascript_tag do %>
|
||||
$('#question_section_id').change(function() {
|
||||
$.ajax({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="question<%= " votable" if question_item.allow_voting? %> div-table" id="question_<%= question_item.id %>">
|
||||
<a href="#<%= question_item.id %>" class="wiki-anchor"></a>
|
||||
<% if question_item.allow_voting? && User.current.allowed_to?(:vote_questions, @project) %>
|
||||
<% if question_item.allow_voting? %>
|
||||
<div class="vote">
|
||||
<%= render :partial => 'questions_votes/question_item_vote', :locals => {:question_item => question_item} %>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
</div>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link({:controller => 'questions', :action => 'preview', :question_id => @question_item}, 'question_form') %>
|
||||
<%= preview_link({:controller => 'questions', :action => 'preview', :question_id => @question_item}, 'question_form') if Redmine::VERSION.to_s <= '3.4.5' %>
|
||||
| <%= link_to l(:button_cancel), question_path(@question_item) %>
|
||||
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="filters">
|
||||
<%= form_tag({:controller => "questions", :action => "index"}, :method => :get, :id => "query_form") do %>
|
||||
<%= text_field_tag(:topic_search, params[:topic_search], :autocomplete => "off", :class => "questions-search", :placeholder => l(:label_questions_search) ) %>
|
||||
<%= javascript_tag "observeSearchfield('topic_search', 'topics_list', '#{ escape_javascript(autocomplete_for_subject_questions_path(:project_id => @project, :section_id => @section)) }')" %>
|
||||
<%= javascript_tag "observeSearchfield('topic_search', 'topics_list', '#{ escape_javascript(autocomplete_for_subject_questions_path(:project_id => @project, :section_id => @section, :sort_order => @sort_order)) }')" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<h2><%= l(:label_message_new) %></h2>
|
||||
|
||||
<%= form_for @question_item, { :url => questions_path, :html => {:multipart => true,
|
||||
<%= form_for @question_item, { :url => project_questions_path(@project, {}), :html => {:multipart => true,
|
||||
:id => 'question_form'}} do |f| %>
|
||||
<div id="all_attributes">
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<%= render partial: 'form', locals: { f: f } %>
|
||||
</div>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<% preview_link({:controller => 'questions', :action => 'preview', :id => @question_item}, 'question_form') %>
|
||||
<% preview_link({ controller: 'questions', action: 'preview', id: @question_item }, 'question_form') if Redmine::VERSION.to_s <= '3.4.5' %>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue