-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webui] Add dialog to create change_devel requests.
The link to the dialog is currently only shown if the package already has a devel project, so that inexperienced users don't devel around w/o knowing the implications.
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/webui/app/views/request/_change_devel_request_dialog.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<% content_for :content_for_head do %> | ||
<%= stylesheet_link_tag 'jquery.autocomplete' %> | ||
<% end %> | ||
<%= javascript_include_tag 'jquery.autocomplete.pack' %> | ||
|
||
<div id="dialog_wrapper"> | ||
<div class="dialog" id="disable_mask"></div> | ||
<div class="dialog darkgrey_box"> | ||
<div class="box box-shadow"> | ||
<div class="box-header aligncenter"> | ||
<b>Change Devel Project Request</b> | ||
</div> | ||
|
||
<% if @current_devel_project && @current_devel_package %> | ||
<p>Do you want to request to change the devel project for <%= render :partial => 'shared/project_or_package_link', :locals => {:project => @project.value('name'), :package => @package.value('name')} %> from | ||
<%= render :partial => 'shared/project_or_package_link', :locals => {:project => @current_devel_project} %>?</p> | ||
<% else %> | ||
<p>Do you want to request to set the devel project for <%= render :partial => 'shared/project_or_package_link', :locals => {:project => @project.value('name'), :package => @package.value('name')} %>?</p> | ||
<% end %> | ||
<% form_tag(:action => 'change_devel_request', :method => 'post') do %> | ||
<%= hidden_field_tag(:project, @project.value('name')) %> | ||
<%= hidden_field_tag(:package, @package.value('name')) %> | ||
<p> | ||
<% if @current_devel_project && @current_devel_package %> | ||
<%= label_tag(:devel_project, 'New Devel project (leave free to delete the current one):') %><br/> | ||
<% else %> | ||
<%= label_tag(:devel_project, 'Devel project:') %><br/> | ||
<% end %> | ||
<%= text_field_tag(:devel_project, '', :size => 40) %><br/> | ||
<%= label_tag(:description, 'Description:') %><br/> | ||
<%= text_area_tag(:description, '', :size => '40x3') %> | ||
</p> | ||
<div class="buttons"> | ||
<%= submit_tag('Ok') %> | ||
<%= link_to_function('Cancel', 'remove_dialog()') %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<% javascript_tag do %> | ||
$('#devel_project').autocomplete('<%= url_for :controller => :project, :action => :autocomplete_projects %>', { | ||
minChars: 2, matchCase: true, max: 50 | ||
}); | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
page.replace 'dialog_wrapper', :partial => 'change_devel_request_dialog' | ||
|