adding login page to mobile, and adding timeago WIP
This commit is contained in:
parent
e9e01e965e
commit
8b3beba93f
11 changed files with 45 additions and 33 deletions
|
|
@ -7,10 +7,11 @@ class HomeController < ApplicationController
|
|||
def show
|
||||
if current_user
|
||||
redirect_to aspects_path
|
||||
elsif is_mobile_device?
|
||||
redirect_to user_session_path
|
||||
else
|
||||
@landing_page = true
|
||||
render :show
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,4 +6,6 @@
|
|||
= render 'shared/publisher', :aspect => aspect, :aspect_ids => aspect_ids
|
||||
#main_stream.stream{:data => {:guids => aspect_ids.join(',')}}
|
||||
= render 'shared/stream', :posts => fakes
|
||||
%a.paginate
|
||||
= t("more")
|
||||
= will_paginate posts
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
= render 'shared/publisher', :aspect_ids => @aspect_ids
|
||||
|
||||
#main_stream.stream
|
||||
= render 'shared/stream', :posts => @posts
|
||||
= render 'shared/stream', :posts => @fakes
|
||||
%a.paginate
|
||||
= t("more")
|
||||
= will_paginate @posts
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,4 +26,6 @@
|
|||
|
||||
#main_stream.stream{:data => {:guids => @aspect.id}}
|
||||
= render 'shared/stream', :posts => @posts
|
||||
%a.paginate
|
||||
= t("more")
|
||||
=will_paginate @posts
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
||||
|
||||
= include_javascripts :mobile
|
||||
- if ["cz", "da", "de", "el", "es", "fr", "he", "hu", "id", "it", "ja", "ko", "nl", "pl", "pt", "ro", "ru", "sv", "zh-CN"].include?(I18n.locale.to_s)
|
||||
= javascript_include_tag "vendor/timeago_locale/jquery.timeago.#{I18n.locale.to_s}.js"
|
||||
= stylesheet_link_tag 'vendor/jquery_mobile.min', 'mobile'
|
||||
= csrf_meta_tag
|
||||
|
||||
|
|
@ -57,38 +59,37 @@
|
|||
= link_to 'logout', destroy_user_session_path
|
||||
|
||||
|
||||
#menu{:data => {:role => 'page'}}
|
||||
#header
|
||||
- if current_user
|
||||
-if current_user
|
||||
#menu{:data => {:role => 'page'}}
|
||||
#header
|
||||
.right
|
||||
= link_to(image_tag('icons/search_white.png'), people_path)
|
||||
= link_to(image_tag('white.png'), aspects_path)
|
||||
= link_to(image_tag('white.png'), aspects_path)
|
||||
|
||||
%div{:data => {:role => 'content'}}
|
||||
%h2
|
||||
= current_user.name
|
||||
%div{:data => {:role => 'content'}}
|
||||
%h2
|
||||
= current_user.name
|
||||
|
||||
%ul{:data => {:role => 'listview', :inset => 'true'}}
|
||||
%li
|
||||
= link_to t('people.edit.your_profile'), person_path(current_user.person)
|
||||
%li
|
||||
= link_to t('notifications.index.notifications'), notifications_path
|
||||
.ui-li-count
|
||||
= @notification_count
|
||||
|
||||
%h4
|
||||
your aspects
|
||||
|
||||
%ul{:data => {:role => 'listview', :inset => 'true'}}
|
||||
%li
|
||||
= link_to t('application.helper.aspect_badge.all_aspects'), aspects_path
|
||||
- for aspect in @all_aspects
|
||||
%ul{:data => {:role => 'listview', :inset => 'true'}}
|
||||
%li
|
||||
= link_to aspect, aspects_path('a_ids[]' => aspect.id)
|
||||
= link_to t('people.edit.your_profile'), person_path(current_user.person)
|
||||
%li
|
||||
= link_to t('notifications.index.notifications'), notifications_path
|
||||
.ui-li-count
|
||||
= @notification_count
|
||||
|
||||
%h4
|
||||
your aspects
|
||||
|
||||
%ul{:data => {:role => 'listview', :inset => 'true'}}
|
||||
%li
|
||||
= link_to t('application.helper.aspect_badge.all_aspects'), aspects_path
|
||||
- for aspect in @all_aspects
|
||||
%li
|
||||
= link_to aspect, aspects_path('a_ids[]' => aspect.id)
|
||||
|
||||
|
||||
#footer
|
||||
- if current_user
|
||||
#footer
|
||||
logged in as
|
||||
= link_to current_user.name, current_user.person
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@
|
|||
- else
|
||||
#main_stream.stream
|
||||
= render 'shared/stream', :posts => @fakes
|
||||
|
||||
%a.paginate
|
||||
= t("more")
|
||||
= will_paginate @posts
|
||||
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@
|
|||
- else
|
||||
#main_stream.stream
|
||||
= render 'shared/stream', :posts => @posts
|
||||
|
||||
%a.paginate
|
||||
= t("more")
|
||||
= will_paginate @posts
|
||||
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
- if posts.length > 0
|
||||
- for post in posts
|
||||
= render 'shared/stream_element', :post => post, :all_aspects => @all_aspects, :commenting_disabled => defined?(@commenting_disabled)
|
||||
%a.paginate
|
||||
= t("more")
|
||||
|
||||
- else
|
||||
= render 'aspects/no_posts_message', :post_count => posts.length
|
||||
= render 'aspects/no_posts<D-F>_message', :post_count => posts.length
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ javascripts:
|
|||
- public/javascripts/custom-mobile-scripting.js
|
||||
- public/javascripts/vendor/jquery-ui-1.8.6.custom.min.js
|
||||
- public/javascripts/vendor/jquery_mobile_a2.min.js
|
||||
- public/javascripts/vendor/jquery.infinitescroll.min.js
|
||||
- public/javascripts/vendor/timeago.js
|
||||
- public/javascripts/mobile.js
|
||||
- public/javascripts/application.js
|
||||
mailchimp:
|
||||
- public/javascripts/vendor/mailchimp/jquery.form.js
|
||||
- public/javascripts/vendor/mailchimp/jquery.validate.js
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
$(window).unbind('.infscr');
|
||||
|
||||
$("a.paginate").live("click", function() {
|
||||
$(this).css("display", "none");
|
||||
$(document).trigger("retrieve.infscr");
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
var Mobile = {
|
||||
initialize: function() {
|
||||
$("abbr.timeago").timeago();
|
||||
$('#aspect_picker').change(Mobile.changeAspect);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue