OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/project_associations/new.html.erb

65 lines
2.3 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= header_tags %>
<% unless User.current.impaired? %>
<%# TODO: Require autocompleter inside select_boxes.js
For lack of a requiring policy (such as requirejs), just include the
autocompleter on its own.
%>
<%= javascript_include_tag "timelines_autocompleter.js" %>
<%= javascript_include_tag "timelines_select_boxes.js" %>
<% end %>
<%= form_for :project_association,
:url => project_project_associations_path(@project),
:html => {:method => 'post'} do |f| %>
<% title = l('timelines.project_association_new',
:project_a => h(@project.name),
:project_b => '?') %>
<h2><%= title.tap { |t| html_title t } %></h2>
<%= label_tag 'project_association_select_project_b_id', l('timelines.project_association_new_for_with',
:project_a => h(@project.name)) %>
<% if User.current.impaired? %>
<%= select("project_association_select", "project_b_id",
grouped_options_for_select(@associated_project_candidates_by_type.collect do |type, projects|
[type.try(:name) || l('timelines.without_project_type'), projects.collect do |candidate|
[candidate.name, candidate.id]
end]
end)) %>
<% else %>
<%= select("project_association_select", "project_b_id",
options_for_select([]),
{},
{ :'data-ajaxURL' => url_for({:controller => "/project_associations",
:action => "available_projects",
:format => "json"})
})
%>
<% end %>
</br>
<%= render :partial => 'form', :locals => {:f => f, :project => @project} %>
<%= f.submit l("timelines.add_project_association"), :name => nil %>
<%= link_to l(:button_cancel), project_project_associations_path(@project) %>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'timelines.css', :plugin => 'chiliproject_timelines', :media => "all" %>
<% end %>