Actualizado plugin Redmine Questions 1.0.0 light
This commit is contained in:
parent
27e60f8ec1
commit
5d7889f1c9
140 changed files with 5342 additions and 1430 deletions
|
@ -0,0 +1,7 @@
|
|||
<%= error_messages_for @section %>
|
||||
<p>
|
||||
<%= f.text_field :name, :required => true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.text_area :description, :rows => 5 %>
|
||||
</p>
|
|
@ -0,0 +1,8 @@
|
|||
<h3 class="title"><%=l(:label_questions_section_new) %></h3>
|
||||
|
||||
<%= labelled_form_for((@project ? [@project, @section] : @section), :remote => true, :html => {:class => 'tabular'}) do |f|%>
|
||||
<%= render :partial => 'form', :locals => { :f => f} %>
|
||||
<p>
|
||||
<%= f.submit l(:button_create) %>
|
||||
</p>
|
||||
<% end %>
|
|
@ -0,0 +1,29 @@
|
|||
<% previous_group = false %>
|
||||
<div class="section-list">
|
||||
<% @sections.each do |section| %>
|
||||
<% if @project.blank? && (group = section.project) != previous_group %>
|
||||
<% reset_cycle %>
|
||||
</div>
|
||||
<% if group %>
|
||||
<div class="project-forums">
|
||||
<h3>
|
||||
<%= group.name %>
|
||||
<%= link_to " \xc2\xbb", project_questions_sections_path(:project_id => group.identifier) %>
|
||||
</h3>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="section-list">
|
||||
<% previous_group = group %>
|
||||
<% end %>
|
||||
|
||||
<a href="<%= url_for({:controller => "questions", :action => 'index', :section_id => section, :project_id => section.project}) %>" id="section_<%= section.id %>" class="section-tile">
|
||||
<h4>
|
||||
<%= section.name %>
|
||||
<span class="topic-count"><%= "(#{section.questions_count})" %></span>
|
||||
</h4>
|
||||
<div class="description">
|
||||
<%= section.description %>
|
||||
</div>
|
||||
</a>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -0,0 +1,8 @@
|
|||
hideModal();
|
||||
<% select = content_tag('select', content_tag('option') + options_from_collection_for_select(QuestionsSection.where(:project_id => @project), :id, :name, @section.id.to_s), :id => 'question_section_id', :name => 'question[section_id]') %>
|
||||
$('#question_section_id').replaceWith('<%= escape_javascript(select) %>');
|
||||
$.ajax({
|
||||
url: '<%= escape_javascript update_form_questions_path(:id => @question_item, :format => 'js', :project_id => @project) %>',
|
||||
type: 'put',
|
||||
data: $('#question_form').serialize()
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
<h2><%=l(:label_questions_section)%></h2>
|
||||
|
||||
<%= labelled_form_for (@project ? [@project, @section] : @section), :method => "PUT", :html => {:class => 'tabular'} do |f|%>
|
||||
<div class="box tabular">
|
||||
<%= back_url_hidden_field_tag %>
|
||||
<%= render :partial => 'form', :locals => { :f => f} %>
|
||||
</div>
|
||||
<p>
|
||||
<%= f.submit l(:button_save) %>
|
||||
</p>
|
||||
<% end %>
|
|
@ -0,0 +1,29 @@
|
|||
<% html_title l(:label_questions) %>
|
||||
<div class="contextual">
|
||||
<%= link_to(l(:label_questions_new),
|
||||
{:controller => 'questions', :action => 'new', :section_id => @section},
|
||||
:class => 'icon icon-add') if User.current.allowed_to?(:add_questions, @project) %>
|
||||
</div>
|
||||
|
||||
|
||||
<h2 class=""><%= l(:label_questions) %></h2>
|
||||
<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', 'forum_list', '#{ escape_javascript(autocomplete_for_subject_questions_path(:project_id => @project, :section_id => @section)) }')" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="forum_list">
|
||||
<%= render :partial => 'tiles' %>
|
||||
</div>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => "questions/latest_topics" %>
|
||||
<%= render :partial => "questions/popular_topics" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag :questions, :plugin => 'redmine_questions' %>
|
||||
<% end %>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<h2><%=l(:label_questions_section_new)%></h2>
|
||||
|
||||
<%= labelled_form_for((@project ? [@project, @section] : @section), :html => {:class => 'tabular'}) do |f|%>
|
||||
<div class="box tabular">
|
||||
<%= back_url_hidden_field_tag %>
|
||||
<%= render :partial => 'form', :locals => { :f => f} %>
|
||||
</div>
|
||||
<p>
|
||||
<%= f.submit l(:button_create) %>
|
||||
</p>
|
||||
<% end %>
|
|
@ -0,0 +1,2 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'new_modal') %>');
|
||||
showModal('ajax-modal', '600px');
|
Loading…
Add table
Add a link
Reference in a new issue