Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

switching to bootstap twitter

  • Loading branch information...
commit 69d2a8957f06b973ecb8da714a2384f63134cd51 1 parent ad93b86
@franck authored
View
4 Gemfile
@@ -8,7 +8,6 @@ gem 'rails', '3.2.0'
gem 'mysql2'
gem 'sqlite3'
-gem 'bourbon'
gem "delocalize" # date/time parsing
gem "redcarpet"
gem 'will_paginate', '> 3.0'
@@ -19,7 +18,8 @@ group :assets do
gem 'sprockets'
gem 'sass-rails'
gem 'coffee-rails', '~> 3.2.1'
-
+ #gem 'bourbon'
+ gem 'bootstrap-sass', '~> 2.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
View
5 Gemfile.lock
@@ -30,8 +30,7 @@ GEM
multi_json (~> 1.0)
ansi (1.4.1)
arel (3.0.0)
- bourbon (1.3.6)
- sass (>= 3.1)
+ bootstrap-sass (2.0.0)
builder (3.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
@@ -164,7 +163,7 @@ PLATFORMS
ruby
DEPENDENCIES
- bourbon
+ bootstrap-sass (~> 2.0.0)
capybara
capybara-webkit
coffee-rails (~> 3.2.1)
View
2  app/assets/javascripts/application.js
@@ -12,4 +12,4 @@
//
//= require jquery
//= require jquery_ujs
-//= require form
+//= require bootstrap
View
20 app/assets/stylesheets/application.css.scss
@@ -17,10 +17,16 @@
*= require_self
*/
-@import "reset.css.scss";
-@import "bourbon";
-@import "colors.css.scss";
-@import "font.css.scss";
-@import "form.css.scss";
-@import 'layout.css.scss';
-@import "clients.css.scss";
+//@import "reset.css.scss";
+//@import "bourbon";
+@import "bootstrap";
+//@import "colors.css.scss";
+//@import "font.css.scss";
+//@import "form.css.scss";
+//@import 'layout.css.scss';
+//@import "clients.css.scss";
+
+h1 { font-size: 218%; margin-top:0em; margin-bottom:0.643em; }
+h2 { font-size: 164%; margin-top:1.929em; margin-bottom:0.643em; }
+h3 { font-size: 145%; margin-top:1.929em; margin-bottom:0.643em; }
+h4 { font-size: 118%; margin-top:1.929em; margin-bottom:0.643em; }
View
8 app/views/clients/_form.erb
@@ -1,19 +1,19 @@
<%= render "/shared/error_messages", :target => @client %>
<div>
<%= f.label :name, "Nom", :class => 'desc required' %>
- <%= f.text_field :name, :class => 'text', :size => '60' %>
+ <%= f.text_field :name, :class => 'input-xlarge' %>
</div>
<div class="two-fields" style="clear:both">
<p>
<%= f.label :phone, "Téléphone", :class => 'desc' %>
- <%= f.text_field :phone, :class => 'text', :size => '20' %>
+ <%= f.text_field :phone, :class => 'input-xlarge' %>
</p>
<p>
<%= f.label :email, "Email", :class => 'desc' %>
- <%= f.text_field :email, :class => 'text', :size => '50' %>
+ <%= f.text_field :email, :class => 'input-xlarge' %>
</p>
</div>
<div style="clear:both">
<%= f.label :comment, "Notes", :class => 'desc' %>
- <%= f.text_area :comment, :size => '80x10', :class => 'text' %>
+ <%= f.text_area :comment, :class => 'input-xxlarge' %>
</div>
View
12 app/views/clients/_search.erb
@@ -1,8 +1,4 @@
-<div class="search">
-<%= form_tag clients_path, :method => 'get' do %>
-<div style="margin-bottom:0px;">
- <%= text_field_tag :search, params[:search], :placeholder => 'nom, email ou tél', class: 'text' %>
- <%= submit_tag "Recherche", :name => nil %>
-</div>
-<% end %>
-</div>
+<%= form_tag clients_path, :method => 'get', :class => 'well form-search' do %>
+ <%= text_field_tag :search, params[:search], :placeholder => 'nom, email ou tél', class: 'search-query' %>
+ <%= submit_tag "Recherche", :name => nil, :class => 'btn btn-small' %>
+<% end %>
View
24 app/views/clients/index.html.erb
@@ -1,20 +1,24 @@
<h1>Liste de clients</h1>
-<%= link_to "Nouveau client", new_client_path, :class => 'second_button new_client_button' %>
-
<%= render "search" %>
-<table>
- <tr>
- <th>Nom</th>
- <th>Email</th>
- <th>Tél</th>
- </tr>
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Nom</th>
+ <th>Email</th>
+ <th>Tél</th>
+ </tr>
+ </thead>
<% for client in @clients %>
<tr>
- <td><%= client.name %></td>
+ <td><%= link_to client.name, client_path(client) %></td>
<td><%= client.email %></td>
<td><%= client.phone %></td>
</tr>
<% end %>
-</table>
+</table>
+
+<p>
+ <%= link_to "Nouveau client", new_client_path, :class => 'btn btn-primary' %>
+</p>
View
4 app/views/clients/new.html.erb
@@ -1,11 +1,11 @@
<h1>Nouveau client</h1>
-<%= form_for @client do |f| %>
+<%= form_for @client, :class => 'form-horizontal' do |f| %>
<%= render "form", :f => f %>
<div style="clear:both">
- <%= f.submit "Ajouter" %>
+ <%= f.submit "Ajouter", class: 'btn' %>
<%= link_to "annuler", clients_path %>
</div>
View
11 app/views/clients/show.html.erb
@@ -1,6 +1,7 @@
<div id="toplinks">
- <%= link_to "Liste clients", clients_path %> -
- <%= link_to "modifier", edit_client_path(@client) %>
+ <%= link_to ("&laquo; Liste clients").html_safe, clients_path %> -
+ <%= link_to "Modifier", edit_client_path(@client) %> -
+ <%= link_to "Nouveau client", new_client_path %>
</div>
<h1><%= @client.name %></h1>
@@ -8,4 +9,8 @@
<%= client_infos(@client) %>
<h3>Notes</h3>
-<%= markdown(@client.comment) %>
+<% if @client.comment.present? %>
+<%= markdown(@client.comment) %>
+<% else %>
+<p>Aucune note</p>
+<% end %>
View
18 app/views/layouts/application.html.erb
@@ -7,12 +7,20 @@
<%= csrf_meta_tags %>
</head>
<body id="<%= params[:controller] %>">
-<div id="container">
- <div id="header"><h2>Barbier du Moulin</h2></div>
- <div id="main">
+ <div class="navbar">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="#">Barbier du moulin</a>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <li class="active"><a href="/">Clients</a></li>
+ </ul>
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+ </div>
+ <div class="container">
<%= yield %>
</div>
- <div id="footer">&nbsp;</div>
-</div>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.