diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml new file mode 100644 index 000000000..6696e331e --- /dev/null +++ b/app/views/layouts/_header.html.haml @@ -0,0 +1,31 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + +.container{:style => "position:relative;"} + #diaspora_text + = link_to "DIASPORA*", (current_user ? root_path : new_user_session_path) + %span.sub_text + ALPHA + + - unless current_user + .right + %ul#landing_nav + %li= link_to "blog", "http://blog.joindiaspora.com" + %li= link_to "developers", "https://github.com/diaspora/diaspora" + %li= link_to "login", new_user_session_path + - else + #global_search + = form_tag(people_path, :method => 'get') do + = text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5 + + %ul#user_menu + .avatar + = owner_image_tag + = link_to current_user.real_name, '#' + %li= link_to t('.view_profile'), current_user.person + %li= link_to t('.edit_profile'), edit_person_path(current_user.person) + %li= link_to t('.account_settings'), edit_user_path(current_user) + %li= link_to t('.logout'), destroy_user_session_path + + = render "shared/aspect_nav" diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d6780ecef..05040dfdd 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -5,20 +5,29 @@ !!! %html{:lang => I18n.locale.to_s} %head + %meta{:charset => 'utf-8'} + %title - = "#{current_user.real_name} | diaspora" if current_user + - if current_user + = "#{current_user.real_name} | DIASPORA" + - else + DIASPORA + + %meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'} %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ + + %link{:rel => 'shortcut icon', :href => '/favicon.ico'} + %link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'} = stylesheet_link_tag "blueprint/screen", :media => 'screen' = stylesheet_link_tag "blueprint/print", :media => 'print' = include_stylesheets :default, :media => 'all' - - - if current_user - %link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.real_name}"} = javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" + :javascript + !window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E')) = include_javascripts :main - if current_user @@ -26,7 +35,9 @@ = render 'js/websocket_js' = csrf_meta_tag + = yield(:head) + = csrf_meta_tag -if APP_CONFIG[:google_a_site] :javascript @@ -40,41 +51,17 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); + - if current_user + %link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.real_name}"} + %body + #notification + - flash.each do |name, msg| = content_tag :div, msg, :id => "flash_#{name}" %header - .container{:style => "position:relative;"} - - #notification - - #diaspora_text - = link_to "DIASPORA*", (current_user ? root_path : new_user_session_path) - %span.sub_text - ALPHA - - - unless current_user - .right - %ul#landing_nav - %li= link_to "blog", "http://blog.joindiaspora.com" - %li= link_to "developers", "https://github.com/diaspora/diaspora" - %li= link_to "login", new_user_session_path - - else - #global_search - = form_tag(people_path, :method => 'get') do - = text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5 - - %ul#user_menu - .avatar - = owner_image_tag - = link_to current_user.real_name, '#' - %li= link_to t('.view_profile'), current_user.person - %li= link_to t('.edit_profile'), edit_person_path(current_user.person) - %li= link_to t('.account_settings'), edit_user_path(current_user) - %li= link_to t('.logout'), destroy_user_session_path - - = render "shared/aspect_nav" + = render 'layouts/header' .container .span-24.last @@ -95,12 +82,13 @@ var is_ssl = ("https:" == document.location.protocol); var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/"; document.write(unescape("%3Cscript src='" + asset_host + "javascripts/feedback-v2.js' type='text/javascript'%3E%3C/script%3E")); + :javascript var feedback_widget_options = {}; feedback_widget_options.display = "overlay"; feedback_widget_options.company = "diaspora"; - feedback_widget_options.placement = "left"; + feedback_widget_options.placement = "right"; feedback_widget_options.color = "#222"; feedback_widget_options.style = "idea"; var feedback_widget = new GSFN.feedback_widget(feedback_widget_options); diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 36a17cd1d..7169158b8 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -20,7 +20,7 @@ - if current_user.owns?(post) .right - = render 'shared/reshare', :post => post if post.is_a? StatusMessage + = render 'shared/reshare', :current_user => current_user, :post => post if post.is_a? StatusMessage = link_to t('delete'), object_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete" = render type_partial(post), :post => post diff --git a/chef/cookbooks/common/recipes/splunk.rb b/chef/cookbooks/common/recipes/splunk.rb index 6e31c2d55..097d5e0bd 100644 --- a/chef/cookbooks/common/recipes/splunk.rb +++ b/chef/cookbooks/common/recipes/splunk.rb @@ -1,39 +1,40 @@ -execute "Download splunk" do - command "cd /tmp/install && wget 'http://www.splunk.com/index.php/download_track?file=4.1.5/linux/splunk-4.1.5-85165-Linux-x86_64.tgz&ac=&wget=true&name=wget&typed=releases'" -end +unless system "splunk status" + execute "Download splunk" do + command "cd /tmp/install && wget 'http://www.splunk.com/index.php/download_track?file=4.1.5/linux/splunk-4.1.5-85165-Linux-x86_64.tgz&ac=&wget=true&name=wget&typed=releases'" + end -execute "Untar splunk" do - command "cd /tmp/install && tar -xvf splunk-4.1.5-85165-Linux-x86_64.tgz" -end + execute "Untar splunk" do + command "tar -xvf /tmp/install/splunk-4.1.5-85165-Linux-x86_64.tgz -C /opt/" + end -execute "Stop old splunk" do - command "/opt/splunk/bin/splunk stop || true" -end - -execute "Remove old splunk" do - command "rm -rf /opt/splunk" -end - -execute "Install splunk" do - command "mv /tmp/install/splunk /opt/splunk" + link "/usr/local/bin/splunk" do + to "/opt/splunk/bin/splunk" + end end execute "Start splunk" do - command "cd /opt/splunk/bin && ./splunk start --accept-license" + command "splunk start --accept-license || true" end execute "Put splunk into forwarding mode" do - command "cd /opt/splunk/bin && ./splunk enable app SplunkLightForwarder -auth admin:changeme" + command "splunk enable app SplunkLightForwarder -auth admin:changeme" end execute "Add forwarding server" do - command "cd /opt/splunk/bin && ./splunk add forward-server splunk.joindiaspora.com:9997 -auth admin:changeme" + command "splunk add forward-server splunk.joindiaspora.com:9997 -auth admin:changeme" + not_if "splunk list forward-server | grep splunk.joindiaspora.com:9997" end execute "Add monitor for diaspora" do - command "cd /opt/splunk/bin && ./splunk add monitor /usr/local/app/diaspora/log" + command "splunk add monitor /usr/local/app/diaspora/log" + not_if "splunk list monitor | grep diaspora" +end + +execute "Add monitor for nginx" do + command "splunk add monitor /usr/local/nginx/logs" + not_if "splunk list monitor | grep nginx" end execute 'Splunk Restart' do - command "cd /opt/splunk/bin && ./splunk restart" + command "splunk restart" end diff --git a/features/manages_contact_requests.feature b/features/manages_contact_requests.feature index f4157c373..876ea754e 100644 --- a/features/manages_contact_requests.feature +++ b/features/manages_contact_requests.feature @@ -6,10 +6,10 @@ Feature: managing contact requests And I have one contact request Scenario: seeing contact requests - When I am on the home page - Then I should see "Manage (1)" in the header + When I am on the home page + Then I should see "Manage (1)" in the header - @javascript @wip + @javascript Scenario: accepting a contact request When I am on the home page And I follow "Manage (1)" diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index fe575c32a..9086b8d5e 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -27,6 +27,5 @@ When /^I wait for the aspects page to load$/ do end When /^I wait for the ajax to finish$/ do - pending - # wait_until { ??? } + wait_until { evaluate_script("$.active") == 0 } end diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 000000000..1ccc5e3a9 Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 610fbacc2..b371219dd 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -220,6 +220,11 @@ header :-moz-border-radius 5px :border-radius 5px + .stream_photo + img + :height 200px + :width 200px + .from :font @@ -885,6 +890,8 @@ h1.big_text img :display none + :height 100px + :width 100px .image_cycle