diff --git a/admin/assets/javascripts/application.js b/admin/assets/javascripts/application.js index 8ab9382..ec509fa 100644 --- a/admin/assets/javascripts/application.js +++ b/admin/assets/javascripts/application.js @@ -210,9 +210,9 @@ $(".reorderable") .disableSelection(); - //the following is for tagsinput typeahead - $('.tag-list-for-post') + if( $('.tag-list-for-post').size > 0){ + $('.tag-list-for-post') .tagsinput('input') .typeahead({ prefetch: '/posts/tags.json' @@ -222,7 +222,7 @@ this.tagsinput('input') .typeahead('setQuery', ''); }, $('input'))); - + }; $('select#post_editor_select') .on('change', function() { diff --git a/admin/views/layouts/application.haml b/admin/views/layouts/application.haml index e03440b..975c61e 100644 --- a/admin/views/layouts/application.haml +++ b/admin/views/layouts/application.haml @@ -9,7 +9,7 @@ %meta{:content => 'text/html; charset=utf-8', 'http-equiv' => 'Content-Type'} %meta{:name => :viewport, :content => 'width=device-width,initial-scale=1'} %title= @title.present? ? "#{@title} | pSaMS Admin" : "pSaMS Admin" - =favicon_tag 'favicon.ico' + =favicon_tag '../assets/images/favicon.ico' %link{:href => 'http://fonts.googleapis.com/css?family=Varela', :rel => :stylesheet} =stylesheet_link_tag 'application' - @plugin_context ||= "admin.#{request.route_obj.controller}.#{request.route_obj.action}" diff --git a/app/presenters/comment_presenter.rb b/app/presenters/comment_presenter.rb index 242090a..cda2301 100644 --- a/app/presenters/comment_presenter.rb +++ b/app/presenters/comment_presenter.rb @@ -9,8 +9,8 @@ def initialize(comment) @avatar = Plugin.apply_filter('comment_avatar', comment.email, comment.freeze) @body_class = Plugin.apply_filter('comment_body_class', "comment.body",comment.freeze) @title_class = Plugin.apply_filter('comment_title_class', "comment.title",comment.freeze) - @updated_at = Plugin.apply_filter('comment_updated_at', comment.updated_at,comment.freeze) - @created_at = Plugin.apply_filter('comment_created_at', comment.created_at,comment.freeze) + @updated_at = Plugin.apply_filter('comment_updated_at', comment.updated_at.localtime, comment.freeze) + @created_at = Plugin.apply_filter('comment_created_at', comment.created_at.localtime,comment.freeze) @id = Plugin.apply_filter('comment_id', comment.id,comment.freeze) @comments = CommentsPresenter.new(comment.comments) end diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index feaed5f..4a40c2f 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -10,8 +10,8 @@ def initialize(post) @author_string = Plugin.apply_filter('post_author', post.account,post.freeze) @body_class = Plugin.apply_filter('post_body_class', "body", post.freeze) @title_class = Plugin.apply_filter('post_title_class', "title",post.freeze) - @updated_at = Plugin.apply_filter('post_updated_at', post.updated_at,post.freeze) - @created_at = Plugin.apply_filter('post_created_at', post.created_at,post.freeze) + @updated_at = Plugin.apply_filter('post_updated_at', post.updated_at.localtime,post.freeze) + @created_at = Plugin.apply_filter('post_created_at', post.created_at.localtime,post.freeze) @id = Plugin.apply_filter('post_id', post.id,post.freeze) @tags = Plugin.apply_filter('post_tags', post.tags,post.freeze) @account = Plugin.apply_filter('post_account', post.account,post.freeze)