Changeset 1362

Show
Ignore:
Timestamp:
08/25/08 14:03:31 (5 months ago)
Author:
alban
Message:

Mise en place de user/show avec la liste des groupes et les infos du compte. Refs #19

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/users_controller.rb

    r1182 r1362  
    4040                @document = user.documents.find_by_keywords(params[:keywords]) 
    4141                @subscription = user.find_subscriptions(:keywords => params[:keywords]) 
    42         end 
    43  
    44         def options 
    45                 @user = User.find(session[:user]) 
    46           @users = User.find(:all, :conditions => ["id != ?", @user.id]) 
    47                 if request.post? 
    48                         if @user.update_attributes(params[:user]) 
    49                                 flash[:success] = "Vos informations ont bien été modifié" 
    50                         else 
    51                                 flash[:failure] = "Vos informations n'ont pas été modifié" 
    52                         end 
    53                 end 
    5442        end 
    5543 
  • trunk/app/views/layouts/documents.rhtml

    r1179 r1362  
    1919   <ul> 
    2020    <% if session[:user] %> 
    21      <li><%= link_to("Dashboard", :controller => "users", :action => "dashboard") %></li> 
    22      <li><%= link_to("Options", :controller => "users", :action => "options") %></li> 
     21     <li><%= link_to("Tableau de bord", :controller => "users", :action => "dashboard") %></li> 
     22     <li><%= link_to("Mon compte", :controller => "user", :action => "show") %></li> 
    2323     <li><%= link_to("Quitter", :controller => "users", :action => "signout") %></li> 
    2424    <% else %> 
  • trunk/app/views/user/edit.rhtml

    r986 r1362  
    88 <p><label for="user_organization">Organisme :</label><br/> 
    99 <%= text_field("user", "organization") %></p> 
    10  <%= submit_tag "Modifier" %> 
    11 <% end %>  
     10 <%= submit_tag "Modifier" %> ou 
     11 <%= link_to "revenir &#8250;", :action => :show, :class => "blue" %> 
     12 
     13<% end %> 
  • trunk/app/views/users/_sidebar.rhtml

    r1144 r1362  
    2424<h2>Participez</h2> 
    2525<p> 
    26 <em>AudioBank se fait avec vous</em>.  
     26<em>AudioBank se fait avec vous</em>. 
    2727</p> 
    2828<p> 
  • trunk/config/custom.rb

    r656 r1362  
    11ActionMailer::Base.default_charset = "utf-8" 
    22ActionMailer::Base.delivery_method = :sendmail 
     3 
     4require 'core_ext' 
  • trunk/config/routes.rb

    r1122 r1362  
    11ActionController::Routing::Routes.draw do |map| 
    22  # The priority is based upon order of creation: first created -> highest priority. 
    3    
     3 
    44  # Sample of regular route: 
    55  # map.connect 'products/:id', :controller => 'catalog', :action => 'view' 
     
    2828  map.connect 'casts/:name', :controller => 'casts', :action => 'play' 
    2929  map.connect 'casts/:name.:format', :controller => 'casts', :action => 'play' 
     30  map.connect 'user/:action', :controller => 'user' 
     31 
    3032  map.connect ':action/:id/:confirm', :controller => 'users', :action => 'confirm' 
    3133        map.connect ':action/:id', :controller => 'users' 
    32          
    33   # You can have the root of your site routed by hooking up ''  
     34 
     35  # You can have the root of your site routed by hooking up '' 
    3436  # -- just remember to delete public/index.html. 
    3537  map.connect '', :controller => 'users', :action => 'welcome' 
  • trunk/public/stylesheets/screen.css

    r1137 r1362  
    4848#frame .unavailable { background: url("../images/unavailable.png") no-repeat; } 
    4949#frame .signup { background: url("../images/author.png") no-repeat; } 
    50 #frame .length { background: url("../images/length.png") no-repeat; }  
     50#frame .length { background: url("../images/length.png") no-repeat; } 
    5151#frame .size { background: url("../images/size.png") no-repeat; } 
    5252#frame .note { background: url("../images/note.png") no-repeat; } 
     
    5858#content p { margin: 0 0 0 6px; } 
    5959#content li { position: relative; margin: 0 12px 8px; padding: 8px 0 0; } 
    60 #content li p, #content form p { margin: 0; }  
     60#content li p, #content form p { margin: 0; } 
    6161#content li.vcard { float: left; width: 45%; padding: 10px 0; } 
    6262#content li.vcard img.photo { float: left; margin: 0 10px 0 0; text-align: center; padding: 2px; border: 1px solid #ccc; background: #fff; } 
     
    7373#content a:hover.rel-tag { text-decoration: none; background: #efefef; } 
    7474ul#welcome { margin: 16px 100px 16px 14px; } 
     75 
     76#content dl { margin-left: 12px; } 
     77#content dl dd { padding: 0; margin: 0; } 
     78#content dl dt { margin-top: 12px; } 
    7579 
    7680#welcome li { margin: 6px; color: #000; padding: 4px 4px 4px 28px; background: #fff url("../images/tick.png") no-repeat 4px 4px; } 
     
    100104 
    101105#errors ul { margin: 0 12px 14px 14px; list-style-type: square; } 
    102 #errors li { margin: 6px; }  
     106#errors li { margin: 6px; } 
    103107 
    104108p#cloud { margin-bottom: 8px; }