Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor UI fixes to issues.

  • Loading branch information...
commit ac8081269128f0cd1519ac7cd3156d88860134fb 1 parent 15f1b9b
@pwnall authored
View
10 Gemfile.lock
@@ -111,19 +111,19 @@ GEM
mime-types (1.18)
mocha (0.10.5)
metaclass (~> 0.0.1)
- multi_json (1.2.0)
+ multi_json (1.3.2)
multipart-post (1.1.5)
mysql2 (0.3.11)
net-ssh (2.3.0)
- oauth2 (0.6.0)
+ oauth2 (0.6.1)
faraday (~> 0.7)
httpauth (~> 0.1)
- multi_json (~> 1.0)
+ multi_json (~> 1.3)
org-ruby (0.6.2)
rubypants (>= 0.2.0)
polyglot (0.3.3)
posix-spawn (0.3.6)
- pygments.rb (0.2.11)
+ pygments.rb (0.2.12)
rubypython (~> 0.5.3)
rack (1.4.1)
rack-cache (1.2)
@@ -169,7 +169,7 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.5)
+ sqlite3 (1.3.6)
therubyracer (0.10.1)
libv8 (~> 3.3.10)
thin (1.3.1)
View
4 app/views/issues/_new_issue_button.html.erb
@@ -0,0 +1,4 @@
+<% if repository.can_read? current_user %>
+<%= button_to 'New Issue', new_profile_repository_issue_path(
+ repository.profile, @repository), :method => :get %>
+<% end %>
View
5 app/views/issues/_no_issues.html.erb
@@ -0,0 +1,5 @@
+<h2>Issues</h2>
+
+<p>There are no issues to display.</p>
+
+<%= render 'issues/new_issue_button', :repository => repository %>
View
32 app/views/issues/index.html.erb
@@ -1,25 +1,17 @@
<%= render @repository %>
-<h2>Listing issues</h2>
-<% unless @issues.select { |i| i.can_read? current_user }.empty? %>
-<h3>Open Issues</h3>
-<% readable_open_issues(@issues, current_user).each do |issue| %>
- <%= render 'issue', :issue => issue %>
-<% end %>
-
-<h3>Closed Issues</h3>
-<% readable_closed_issues(@issues, current_user).each do |issue| %>
- <%= render 'issue', :issue => issue %>
-<% end %>
-
+<% if @issues.select { |i| i.can_read? current_user }.empty? %>
+<%= render 'issues/no_issues', :repository => @repository %>
<% else %>
-There are no issues to display.
-<% end %>
-
-<br />
+ <%= render 'issues/new_issue_button', :repository => @repository %>
-<% if @repository.can_read? current_user %>
-<%= button_to 'New Issue', new_profile_repository_issue_path(
- @repository.profile, @repository),
- :method => :get %>
+ <% unless (issues = readable_open_issues(@issues, current_user)).empty? %>
+ <h2>Open Issues</h2>
+ <%= render issues %>
+ <% end %>
+
+ <% unless (_issues = readable_closed_issues(@issues, current_user)).empty? %>
+ <h2>Closed Issues</h2>
+ <%= render issues %>
+ <% end %>
<% end %>
View
2  app/views/issues/new.html.erb
@@ -1,5 +1,3 @@
<h1>New issue</h1>
<%= render 'form' %>
-
-<%= link_to 'Back', profile_repository_issues_path(@profile, @repository) %>
Please sign in to comment.
Something went wrong with that request. Please try again.