issues counter are now live updated on creation/deleteion/reopening …

buttons on forms are disabled on submit (re-enabled after the request is complete)
This commit is contained in:
Staicu Ionut 2012-07-10 07:33:04 +03:00
parent be1b40802d
commit ba7b85d0d9
7 changed files with 48 additions and 11 deletions

View file

@ -6,7 +6,9 @@
.row
.span7= paginate @issues, :remote => true, :theme => "gitlab"
.span3.right
%span.cgray.right #{@issues.total_count} issues for this filter
%span.cgray.right
%span.issue_counter #{@issues.total_count}
issues for this filter
- else
%li
%h4.nothing_here_message Nothing to show here

View file

@ -12,9 +12,9 @@
= issue.notes.count
- if can? current_user, :modify_issue, issue
- if issue.closed
= link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small grouped", :remote => true
= link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small grouped reopen_issue", :remote => true
- else
= link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small grouped", :remote => true
= link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small grouped close_issue", :remote => true
= link_to edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true do
%i.icon-edit
Edit
@ -35,6 +35,4 @@
 
- if issue.upvotes > 0
%span.badge.badge-success= "+#{issue.upvotes}"
%span.badge.badge-success= "+#{issue.upvotes}"

View file

@ -2,7 +2,7 @@
.issues_content
%h3.page_title
Issues
%small (#{@issues.total_count})
%small (<span class=issue_counter>#{@issues.total_count}</span>)
.right
.span5
- if can? current_user, :write_issue, @project
@ -45,4 +45,4 @@
:javascript
$(function(){
issuesPage();
})
})

View file

@ -17,14 +17,14 @@
%li{:class => tab_class(:issues)}
= link_to project_issues_filter_path(@project) do
Issues
%span.count= @project.issues.opened.count
%span.count.issue_counter= @project.issues.opened.count
- if @project.repo_exists?
- if @project.merge_requests_enabled
%li{:class => tab_class(:merge_requests)}
= link_to project_merge_requests_path(@project) do
Merge Requests
%span.count= @project.merge_requests.opened.count
%span.count.merge_counter= @project.merge_requests.opened.count
- if @project.wall_enabled
%li{:class => tab_class(:wall)}