History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CCRB-153
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Minor Minor
Assignee: Unassigned
Reporter: Jaanus Siim
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
CruiseControl.rb

[PATCH] Index page layout for more then 5 projects

Created: 15/Aug/07 11:34 AM   Updated: 21/Nov/07 10:57 PM
Component/s: Dashboard
Affects Version/s: None
Fix Version/s: 1.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. File fix_index_layout_for_over_five_projects.diff (0.7 kb)
2. File fix_index_layout_for_over_five_projects_right.diff (0.5 kb)

Image Attachments:

1. screenshot-1.jpg
(202 kb)
Environment: Ubuntu


 Description  « Hide
If we have more then 5 projects, incorrect index page is generated. The first project on page is with incorrect style. After first reload all projects are inserted again into html (this is how I understand it). After the first project. So we have all projects doubled on page (in my case it is 12 elements). If I added table with width=100% around the code, generated in else clause of 'if @projects.length <= 5', everything is OK!

PATCH>>>

Index: app/views/projects/index.rhtml
===================================================================
--- app/views/projects/index.rhtml (revision 524)
+++ app/views/projects/index.rhtml (working copy)
@@ -8,10 +8,14 @@
     <% end -%>
   <% else %>
 
- <table>
- <% @projects.each do |project| -%>
- <%= render :partial => 'project', :locals => {:project => project }%>
- <% end -%>
+ <table width="100%">
+ <tr>
+ <td>
+ <% @projects.each do |project| -%>
+ <%= render :partial => 'project', :locals => {:project => project }%>
+ <% end -%>
+ </td>
+ </tr>
     </table>
   <% end %>
 
<<<<PATCH

BTW: Is there no way to attach the diff file?

BR,
JaanusSiim

 All   Comments   Work Log   Change History      Sort Order:
Jaanus Siim [15/Aug/07 11:35 AM]
Found the way for patch

Jaanus Siim [15/Aug/07 11:38 AM]
Added screenshot of the problem

Jaanus Siim [15/Aug/07 11:44 AM]
BTW, is there a difference between
svn checkout svn://rubyforge.org/var/svn/cruisecontrolrb and
svn checkout http://cruisecontrolrb.rubyforge.org/svn/trunk/ ?

The code, that I used, was in head if svn checkout http://cruisecontrolrb.rubyforge.org/svn/trunk/

Jaanus

Jaanus Siim [15/Aug/07 12:17 PM]
I have to apologize. The fix with table made, just until first reload, the screen a bit wider and scrollbar appeared at bottom. It looked a bit weird. Just replacing table with div solved that problem. Uploading new diff file... Sorry!

Jaanus

Jaanus Siim [15/Aug/07 12:18 PM]
The fix with div's. This is the correct solution

Rolf Russell [21/Nov/07 10:57 PM]
Duplicate of CCRB-160 which was fixed in revision 568