aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLuc Donnet2012-04-13 18:11:39 +0200
committerLuc Donnet2012-04-13 18:11:39 +0200
commit210cec8f14d86b04dd85571c5d0d1db732ab0dfd (patch)
treef80c22827dcf8598ccbd96c64dbb16a201552c12 /app
parent0b22254795fa98f762307b2e32599d150a3e87cb (diff)
parent35e03fb3188610308d9127a9bab878c2234b22db (diff)
downloadchouette-core-210cec8f14d86b04dd85571c5d0d1db732ab0dfd.tar.bz2
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
Diffstat (limited to 'app')
-rw-r--r--app/controllers/application_controller.rb2
-rw-r--r--app/models/user.rb9
-rw-r--r--app/views/companies/show.html.erb8
-rw-r--r--app/views/layouts/_user_links.erb8
-rw-r--r--app/views/networks/show.html.erb8
-rw-r--r--app/views/stop_areas/show.html.erb2
-rw-r--r--app/views/time_tables/show.html.erb8
7 files changed, 37 insertions, 8 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 7050568de..ae953a25a 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,4 +1,4 @@
class ApplicationController < ActionController::Base
protect_from_forgery
-
+ before_filter :authenticate_user!
end
diff --git a/app/models/user.rb b/app/models/user.rb
new file mode 100644
index 000000000..b2f7c8ec9
--- /dev/null
+++ b/app/models/user.rb
@@ -0,0 +1,9 @@
+class User < ActiveRecord::Base
+ # Include default devise modules. Others available are:
+ # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
+ devise :database_authenticatable, :registerable,
+ :recoverable, :rememberable, :trackable, :validatable
+
+ # Setup accessible (or protected) attributes for your model
+ attr_accessible :email, :password, :password_confirmation, :remember_me
+end
diff --git a/app/views/companies/show.html.erb b/app/views/companies/show.html.erb
index 09a54e98b..16d104969 100644
--- a/app/views/companies/show.html.erb
+++ b/app/views/companies/show.html.erb
@@ -43,6 +43,14 @@
<label><%= Chouette::Company.human_attribute_name("objectid") %>: </label>
<%= @company.objectid %>
</p>
+ <p>
+ <label><%= @company.human_attribute_name("creation_time") %>: </label>
+ <%= @company.creation_time %>
+ </p>
+ <p>
+ <label><%= @company.human_attribute_name("creator_id") %>: </label>
+ <%= @company.creator_id %>
+ </p>
</div>
</div>
diff --git a/app/views/layouts/_user_links.erb b/app/views/layouts/_user_links.erb
index 41d01375c..f82d4d7b4 100644
--- a/app/views/layouts/_user_links.erb
+++ b/app/views/layouts/_user_links.erb
@@ -1,5 +1,13 @@
<ul class="user">
<li class="home"><%= link_to t('layouts.home'), root_path %></li>
+
+ <% if user_signed_in? %>
+ <li> | </li>
+ <li><%= link_to t('layouts.user.profile'), edit_user_registration_path %></li>
+ <li> | </li>
+ <li><%= link_to t('layouts.user.sign_out'), destroy_user_session_path, :method => :delete %></li>
+ <% end %>
+
<li> | </li>
<li class="<%= language_class("fr") %>"><%= link_to_language :fr %></li>
<li class="<%= language_class("en") %>"><%= link_to_language :en %></li>
diff --git a/app/views/networks/show.html.erb b/app/views/networks/show.html.erb
index e33ecbcf9..6822cf41e 100644
--- a/app/views/networks/show.html.erb
+++ b/app/views/networks/show.html.erb
@@ -35,6 +35,14 @@
<label><%= Chouette::Network.human_attribute_name("objectid") %>: </label>
<%= @network.objectid %>
</p>
+ <p>
+ <label><%= @network.human_attribute_name("creation_time") %>: </label>
+ <%= @network.creation_time %>
+ </p>
+ <p>
+ <label><%= @network.human_attribute_name("creator_id") %>: </label>
+ <%= @network.creator_id %>
+ </p>
</div>
</div>
diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb
index 27ce46880..108a69a2b 100644
--- a/app/views/stop_areas/show.html.erb
+++ b/app/views/stop_areas/show.html.erb
@@ -35,7 +35,7 @@
<label><%= @stop_area.human_attribute_name("type") %>: </label>
<%= t("area_types.label.#{@stop_area.type}") %>
</p>
- <p><%= t('stop_areas.show.geographic_data') %></p>
+ <p> <label><%= t('stop_areas.show.geographic_data') %> </label></p>
<% if @stop_area.projectiontype == nil && @stop_area.longlattype == nil %>
<span class='geo_data'><%= t('stop_areas.show.no_geographic_data') %></span>
<% else %>
diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb
index d556d88e7..5fe52a3af 100644
--- a/app/views/time_tables/show.html.erb
+++ b/app/views/time_tables/show.html.erb
@@ -94,20 +94,16 @@
</p>
- </div>
- <div>
<p>
<label><%= @time_table.human_attribute_name("periods") %>: </label>
</p>
<%= render :partial => "period", :collection => @time_table.periods %>
- </div>
- <div>
+
<p>
<label><%= @time_table.human_attribute_name("dates") %>: </label>
</p>
<%= render :partial => "date", :collection => @time_table.dates %>
- </div>
- <div>
+
<p>
<label><%= @time_table.human_attribute_name("objectid") %>: </label>
<%= @time_table.objectid %>