https://svn.lrde.epita.fr/svn/ranch/trunk
Index: ChangeLog
from Nicolas Despr�s <nicolas.despres(a)gmail.com>
Add project menu bar.
* web/ranch/app/views/layouts/projects.rhtml: Include the menu bar in
the page.
* web/ranch/app/views/projects/_menubar.rhtml: New. Menu bar for the
project controller.
* web/ranch/app/views/projects/show.rhtml: No longer display the name
of the project since it's displayed in the menu bar.
layouts/projects.rhtml | 13 ++++++++++++-
projects/_menubar.rhtml | 12 ++++++++++++
projects/show.rhtml | 8 --------
3 files changed, 24 insertions(+), 9 deletions(-)
Index: web/ranch/app/views/layouts/projects.rhtml
--- web/ranch/app/views/layouts/projects.rhtml (revision 46)
+++ web/ranch/app/views/layouts/projects.rhtml (working copy)
@@ -7,14 +7,25 @@
<%= render :partial => "layouts/menubar" %>
<p>
- <table cellspacing=0 cellpadding=0 border=0 width='100%'
height="80%" cols=2>
+ <table cellspacing=0 cellpadding=0 border=0 width="100%"
height="80%" cols=2>
<tr>
<td class=left_margin valign=top width="15%">
<%= render :partial => "projects/list" %>
</td>
<td class=content align=left valign=top width="80%">
+ <% if @project.nil? %>
+ No project
+ <% else %>
+ <table width="100%">
+ <tr><td>
+ <%= render :partial => "projects/menubar" %>
+ </td></tr>
+ <tr><td>
<%= @content_for_layout %>
+ </td></tr>
+ </table>
+ <% end %>
</td>
</tr>
Index: web/ranch/app/views/projects/_menubar.rhtml
--- web/ranch/app/views/projects/_menubar.rhtml (revision 0)
+++ web/ranch/app/views/projects/_menubar.rhtml (revision 0)
@@ -0,0 +1,12 @@
+ <!-- -*- html -*- -->
+<table>
+ <tr>
+ <td><%= content_tag "h3", @project.name %></td>
+ <td>
+ <%= link_to "show", :controller => "projects",
+ :action => "show",
+ :project_id => @project.id %>
+ </td>
+ </tr>
+</table>
+<hr>
Index: web/ranch/app/views/projects/show.rhtml
--- web/ranch/app/views/projects/show.rhtml (revision 46)
+++ web/ranch/app/views/projects/show.rhtml (working copy)
@@ -1,11 +1,5 @@
<!-- -*- html -*- -->
-<% if @project.nil? %>
- No project to show
-<% else %>
-
-<%= content_tag "h3", "#{(a)project.name}" %>
-
<p>
<table>
<tr>
@@ -14,5 +8,3 @@
</tr>
</table>
</p>
-
-<% end %>
\ No newline at end of file