issue can be edit from show page

This commit is contained in:
gitlabhq 2011-10-27 18:18:50 +03:00
parent f4e7ad7a4b
commit 2258db66c2
3 changed files with 11 additions and 2 deletions

View file

@ -45,7 +45,7 @@
}); });
$('.delete-issue').live('ajax:success', function() { $('.delete-issue').live('ajax:success', function() {
$(this).closest('tr').fadeOut(); }); $(this).closest('tr').fadeOut(); updatePage();});
function setSortable(){ function setSortable(){
$('#issues-table>tbody').sortable({ $('#issues-table>tbody').sortable({

View file

@ -3,6 +3,10 @@
.span-15 .span-15
= simple_format html_escape(@issue.content) = simple_format html_escape(@issue.content)
.clear
%br
.issue_notes= render "notes/notes" .issue_notes= render "notes/notes"
.span-8.right .span-8.right
.span-8 .span-8
@ -39,5 +43,10 @@
- else - else
= check_box_tag "closed", 1, @issue.closed, :disabled => true = check_box_tag "closed", 1, @issue.closed, :disabled => true
- if can?(current_user, :admin_issue, @issue)
.clear
= link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true
.right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}"
.clear .clear

View file

@ -6,7 +6,7 @@
- if @issue.valid? - if @issue.valid?
:plain :plain
$("#edit_issue_dialog").dialog("close"); $("#edit_issue_dialog").dialog("close");
$.ajax({type: "GET", url: location.href, dataType: "script"}); updatePage();
- else - else
:plain :plain
$("#edit_issue_dialog").empty(); $("#edit_issue_dialog").empty();