Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Changed routes for pages (refs https://trello.com/c/WF0JJ50L/501--) #7

Merged
merged 1 commit into from
Feb 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/web/pages_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Web::PagesHelper
# TODO: убрать
def is_contacts_page?
request.path == '/pages/contacts'
request.path == '/contacts'
end
end
2 changes: 1 addition & 1 deletion app/views/layouts/web/shared/_header.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
%a{ href: user_lectures_path, title: "Доклады 2.0" } Доклады 2.0
%a{ href: schedule_path, title: "Программа" } Программа
%a{ href: users_path, title: "Участники" } Участники
%a{ href: speaker_index_path, title: "Спикерам" } Спикерам
%a{ href: speaker_path, title: "Спикерам" } Спикерам
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ой, а ведь должен быть helper = link_to

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я займусь рефакторингом позже)

%a{ href: contacts_path, title: "Контакты" } Контакты
.header__login
- unless signed_in?
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/web/shared/_plaha.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
%b 14-15 апреля 2017 года,
Ленинский мемориал, Ульяновск
%p.infoline__right
= link_to "Проживание и проезд", page_path("hotel")
= link_to "AfterParty", page_path('afterparty')
= link_to "Проживание и проезд", hotel_path
= link_to "AfterParty", afterparty_path
- unless current_user
= link_to "Регистрация", new_user_path
= link_to "Купить билет (#{price})", buy_now_path
2 changes: 1 addition & 1 deletion app/views/web/contacts/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
%p
%a{:href => "/system/uploads/ckeditor/attachments/166/for_sponsors_2016.PDF"} Для спонсоров
%h2.contacts__info__title
%a{:href => "/pages/banners"} Баннеры Стачки 2017
%a{:href => "/banners"} Баннеры Стачки 2017
%div
%p Вы сможете приобрести билет на VI Международную IT-конференцию "Стачка" на нашем сайте. 
%p Всех, купивших билеты, ждём на "Стачке" 14 и 15 апреля 2017 года с 11-00 до 19-00 (время местное, MSK+1) в Ленинском Мемориале по адресу г. Ульяновск, пл. 100-летия со дня рождения В.И.Ленина, дом 1 
Expand Down
2 changes: 1 addition & 1 deletion app/views/web/users/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%input#privacy.checkbox_type-1{ name: "privacy_order", type: "checkbox" }
%label.privacy_checkbox{ for: "privacy" }
= t('.privacy_politics')
= link_to t('.privacy_politics_document'), "/pages/privacy", target: "_blank"
= link_to t('.privacy_politics_document'), "/privacy", target: "_blank"
.personal__identity
.personal__identity__number
%h5 Информация
Expand Down
14 changes: 10 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@
resources :users, only: [:new, :create, :index]
resources :welcome, only: [:index]
resources :lectures, only: [:index]
resources :speaker, only: [:index]
resources :contacts, only: [:index]
get '/contacts', to: 'pages#show', defaults: { id: 'contacts' }
get '/hotel', to: 'pages#show', defaults: { id: 'hotel' }
get '/speaker', to: 'pages#show', defaults: { id: 'speaker' }
get '/afterparty', to: 'pages#show', defaults: { id: 'afterparty' }
get '/social_wall', to: 'pages#show', defaults: { id: 'social_wall' } # will be refactored later
get '/app', to: 'pages#show', defaults: { id: 'app' }
get '/privacy', to: 'pages#show', defaults: { id: 'privacy' }
get '/stroll', to: 'pages#show', defaults: { id: 'stroll' }
get '/location', to: 'pages#show', defaults: { id: 'location' }
get '/banners', to: 'pages#show', defaults: { id: 'banners' }
resources :pages, only: [:show]
resources :promo, only: [:show]
get '/promo', to: redirect('/promo/programmers')
Expand Down Expand Up @@ -120,8 +128,6 @@
get :authorization, on: :member
end

resource :social_wall, only: [:show]

namespace :registrator do
root to: "users#index"
resource :users, only: [:index, :new, :create] do
Expand Down
8 changes: 4 additions & 4 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
<loc>http://nastachku.ru/users</loc>
</url>
<url>
<loc>http://nastachku.ru/pages/social_wall</loc>
<loc>http://nastachku.ru/social_wall</loc>
</url>
<url>
<loc>http://nastachku.ru/pages/contacts</loc>
<loc>http://nastachku.ru/contacts</loc>
</url>
<url>
<loc>http://nastachku.ru/pages/afterparty</loc>
<loc>http://nastachku.ru/afterparty</loc>
</url>
<url>
<loc>http://nastachku.ru/users/new</loc>
</url>
<url>
<loc>http://nastachku.ru/pages/privacy</loc>
<loc>http://nastachku.ru/privacy</loc>
</url>
</urlset>