About page, index page[en]
This commit is contained in:
		
							parent
							
								
									215c00a1a8
								
							
						
					
					
						commit
						9305237bac
					
				@ -9,12 +9,12 @@ class window.Ajax
 | 
			
		||||
  
 | 
			
		||||
  loadIndexPage: ->
 | 
			
		||||
    $('#content').load '/greetings/'
 | 
			
		||||
    _ajax.setTitle ''
 | 
			
		||||
    false
 | 
			
		||||
  
 | 
			
		||||
  loadAboutPage: ->
 | 
			
		||||
    $.get '/templates/about.html', (data) ->
 | 
			
		||||
      _page.renderTextpage data
 | 
			
		||||
      _ajax.setTitle 'About'
 | 
			
		||||
    $('#content').load '/about/'
 | 
			
		||||
    _ajax.setTitle 'About'
 | 
			
		||||
    false
 | 
			
		||||
  
 | 
			
		||||
  setArchor: (anchor) ->
 | 
			
		||||
@ -34,14 +34,12 @@ class window.Ajax
 | 
			
		||||
  detectPage: () ->
 | 
			
		||||
    if m = _ajax.getAnchor().match /\/artist\/(.+)\//
 | 
			
		||||
      _search.loadArtistData m[1]
 | 
			
		||||
    else if _ajax.getAnchor().match /\//
 | 
			
		||||
      _ajax.loadIndexPage();
 | 
			
		||||
    else if _ajax.getAnchor().match /\/settings\//
 | 
			
		||||
      _settings.loadSettingsPage()
 | 
			
		||||
    else if _ajax.getAnchor().match /\/about\//
 | 
			
		||||
      _ajax.loadAboutPage()
 | 
			
		||||
    else
 | 
			
		||||
      #_ajax.loadSearchPage()
 | 
			
		||||
      _ajax.loadIndexPage();
 | 
			
		||||
    false
 | 
			
		||||
 | 
			
		||||
$(window).bind 'hashchange', ->
 | 
			
		||||
 | 
			
		||||
@ -11,6 +11,10 @@ class ApplicationController < ActionController::Base
 | 
			
		||||
    render :partial => 'greetings'
 | 
			
		||||
  end
 | 
			
		||||
  
 | 
			
		||||
  def about
 | 
			
		||||
    render :partial => 'about'
 | 
			
		||||
  end
 | 
			
		||||
  
 | 
			
		||||
  protected
 | 
			
		||||
  
 | 
			
		||||
  def authorize
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								app/views/application/_about.en.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								app/views/application/_about.en.html.haml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
%h2 Write us a letter!
 | 
			
		||||
%br
 | 
			
		||||
.row
 | 
			
		||||
  .span3
 | 
			
		||||
    %address
 | 
			
		||||
      %strong Site issues?
 | 
			
		||||
      %br
 | 
			
		||||
      %a{ :href => "mailto:support@beathaven.org" } support@beathaven.org
 | 
			
		||||
  .span6
 | 
			
		||||
    %address
 | 
			
		||||
      %strong Everything else (suggestions, compliments, threats)
 | 
			
		||||
      %br
 | 
			
		||||
      %a{ :href => "mailto:contact@beathaven.org" } contact@beathaven.org
 | 
			
		||||
							
								
								
									
										13
									
								
								app/views/application/_about.ru.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								app/views/application/_about.ru.html.haml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
%h2 Напишите нам письмо!
 | 
			
		||||
%br
 | 
			
		||||
.row
 | 
			
		||||
  .span3
 | 
			
		||||
    %address
 | 
			
		||||
      %strong Проблемы с сайтом?
 | 
			
		||||
      %br
 | 
			
		||||
      %a{ :href => "mailto:support@beathaven.org" } support@beathaven.org
 | 
			
		||||
  .span6
 | 
			
		||||
    %address
 | 
			
		||||
      %strong Все остальное (пожелания, благодарности, угрозы)
 | 
			
		||||
      %br
 | 
			
		||||
      %a{ :href => "mailto:contact@beathaven.org" } contact@beathaven.org
 | 
			
		||||
							
								
								
									
										1
									
								
								app/views/application/_greetings.en.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								app/views/application/_greetings.en.html.haml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
%h2 Halló!
 | 
			
		||||
@ -1 +1 @@
 | 
			
		||||
%h1 Привет!
 | 
			
		||||
%h2 Привет!
 | 
			
		||||
@ -58,6 +58,7 @@ Beathaven::Application.routes.draw do
 | 
			
		||||
  
 | 
			
		||||
  match '/' => 'application#index'
 | 
			
		||||
  match '/greetings/' => 'application#greetings'
 | 
			
		||||
  match '/about/' => 'application#about'
 | 
			
		||||
  
 | 
			
		||||
  match 'user/auth' => 'user#auth'
 | 
			
		||||
  match 'user/update' => 'user#update'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user