Commit 2258db66c2e8ddccc1716b92f9d9a3a1cb3eff7f

Authored by gitlabhq
1 parent f4e7ad7a

issue can be edit from show page

app/views/issues/index.html.haml
... ... @@ -45,7 +45,7 @@
45 45 });
46 46  
47 47 $('.delete-issue').live('ajax:success', function() {
48   - $(this).closest('tr').fadeOut(); });
  48 + $(this).closest('tr').fadeOut(); updatePage();});
49 49  
50 50 function setSortable(){
51 51 $('#issues-table>tbody').sortable({
... ...
app/views/issues/show.html.haml
... ... @@ -3,6 +3,10 @@
3 3  
4 4 .span-15
5 5 = simple_format html_escape(@issue.content)
  6 +
  7 +
  8 + .clear
  9 + %br
6 10 .issue_notes= render "notes/notes"
7 11 .span-8.right
8 12 .span-8
... ... @@ -39,5 +43,10 @@
39 43 - else
40 44 = check_box_tag "closed", 1, @issue.closed, :disabled => true
41 45  
  46 +
  47 + - if can?(current_user, :admin_issue, @issue)
  48 + .clear
  49 + = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true
  50 + .right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}"
42 51 .clear
43 52  
... ...
app/views/issues/update.js.haml
... ... @@ -6,7 +6,7 @@
6 6 - if @issue.valid?
7 7 :plain
8 8 $("#edit_issue_dialog").dialog("close");
9   - $.ajax({type: "GET", url: location.href, dataType: "script"});
  9 + updatePage();
10 10 - else
11 11 :plain
12 12 $("#edit_issue_dialog").empty();
... ...