From 2987ed94cfabfab5c34314b095127ed2ff99035a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Pleba=C5=84ski?= Date: Wed, 15 Apr 2009 21:35:45 +0200 Subject: [PATCH 1/2] Fixed #49 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index aa08259..fee0e0a 100755 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -165,7 +165,7 @@ def will_paginate_with_i18n(collection, options = {}) def help_tag(a_id, title = 'Pomoc') result = <<-HTML - + Pomoc From 6008d30bbb0acf32348cebf6b16758e59826eaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Pleba=C5=84ski?= Date: Wed, 15 Apr 2009 23:07:52 +0200 Subject: [PATCH 2/2] Added StaticController and terms --- app/controllers/static_controller.rb | 6 +++++ app/views/layouts/application.html.erb | 4 +-- app/views/shared/_bottom_sidebar.html.erb | 4 +-- app/views/static/authors.html.erb | 7 +++++ app/views/static/terms.html.erb | 31 +++++++++++++++++++++++ app/views/users/new.html.erb | 3 +++ config/routes.rb | 1 + public/stylesheets/layout.css | 7 +++++ public/terms.html | 7 ----- 9 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 app/controllers/static_controller.rb create mode 100644 app/views/static/authors.html.erb create mode 100644 app/views/static/terms.html.erb delete mode 100644 public/terms.html diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb new file mode 100644 index 0000000..90aa1ab --- /dev/null +++ b/app/controllers/static_controller.rb @@ -0,0 +1,6 @@ +class StaticController < ApplicationController + + def terms + end + +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a18c41d..d43745e 100755 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -49,8 +49,8 @@
  • Pomoc
  • -
  • FAQ
  • -
  • Regulamin
  • +
  • <%= link_to("O nas", static_url(:action => "authors"))%>
  • +
  • <%= link_to("Regulamin", static_url(:action => "terms"), :class => 'last')%>
diff --git a/app/views/shared/_bottom_sidebar.html.erb b/app/views/shared/_bottom_sidebar.html.erb index 3d90d95..d156b43 100644 --- a/app/views/shared/_bottom_sidebar.html.erb +++ b/app/views/shared/_bottom_sidebar.html.erb @@ -1,6 +1,6 @@
- <% cache("#{@current_user.id}-quick-categories") do %> + <% cache("#{self.current_user.id}-quick-categories") do %>

<%= help_tag('system_elements.other.quick_access') %> @@ -28,7 +28,7 @@

- <% @current_user.categories.each do |c| %> + <% self.current_user.categories.each do |c| %> <%= link_to "#{c.name}
", category_path(c) , obj_hash_id('category-in-menu', c).merge( diff --git a/app/views/static/authors.html.erb b/app/views/static/authors.html.erb new file mode 100644 index 0000000..f6c21b2 --- /dev/null +++ b/app/views/static/authors.html.erb @@ -0,0 +1,7 @@ +
+ +

O nas

+

+Jesteśmy studentami

+ +
\ No newline at end of file diff --git a/app/views/static/terms.html.erb b/app/views/static/terms.html.erb new file mode 100644 index 0000000..e71a113 --- /dev/null +++ b/app/views/static/terms.html.erb @@ -0,0 +1,31 @@ +
+ +

Regulamin

+

+ Obecna wersja systemu to Live Demo, obowiązują w niej takie zasady:

+
    +
  • możesz dowolnie używać serwisu
  • +
  • nie będziemy udawać, że nas obchodzi że Ci nie działa ;) (aczkolwiek błędy można + zgłaszać na lighthouse, poza tym zrobimy co w naszej mocy by aplikacja była jak + najlepsza)
  • +
  • nie bierzemy żadnej odpowiedzialności za działanie serwisu
  • +
  • możemy wyłączyć serwis w każdej chwili, jeśli nam się znudzi + hostowanie go (lub zabraknie nam funduszy)
  • +
  • to jest tylko pokaz możliwości systemu manage-my-money którego źródła dostępne są na + github
  • +
  • działalność serwisu ma charakter non-profit
  • +
+ +

+ Są plany byśmy byli prawdziwym serwisem:

+
    +
  • będziesz mógł sobie klikać tam, gdzie Ci pozwolimy
  • +
  • udamy, że nas obchodzi że Ci nie działa :)
  • +
  • weźmiemy odpowiedzialność, za.... za to żeby serwis był raczej włączony
  • +
  • nie wyłączymy tego gdy nam się znudzi. Gdyby tak się stało damy info + dużo wcześniej i pozwolimy Ci zabrać swoje dane!
  • +
  • będziemy działać totalnie for-profit
  • +
+ + +
\ No newline at end of file diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 89b0774..1c56d31 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -16,5 +16,8 @@

<%= f.label :password_confirmation, 'Potwierdź hasło' %> <%= f.password_field :password_confirmation %><%= help_tag 'system_elements.user.new.password_confirmation' %>

+ +

Rejestrując się w serwisie potwierdzasz, że zapoznałeś się z <%= link_to "regulaminem", static_url(:action => "terms")%> +

<%= submit_tag 'Zarejestruj mnie' %>

<% end -%> diff --git a/config/routes.rb b/config/routes.rb index 9916965..97986df 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -88,6 +88,7 @@ map.exchanges_list '/exchanges/:left_currency/:right_currency', :controller => 'exchanges', :action => 'list' + map.static '/static/:action', :controller => 'static' # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' diff --git a/public/stylesheets/layout.css b/public/stylesheets/layout.css index e8218c4..1672357 100755 --- a/public/stylesheets/layout.css +++ b/public/stylesheets/layout.css @@ -829,3 +829,10 @@ div.auto_complete ul strong.highlight { vertical-align: top; text-decoration:none; } + + +ul.terms li { + margin-bottom: 7px; +} + + diff --git a/public/terms.html b/public/terms.html deleted file mode 100644 index 98e78dc..0000000 --- a/public/terms.html +++ /dev/null @@ -1,7 +0,0 @@ - - - -

Regulamin

- - -