Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getting_started.haml « users « views « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 66d2d5b42c460f17ab080b5f98d8faad309e0559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

- content_for :head do
  = include_javascripts :profile

  :javascript
    $(document).ready(function () {
      var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
          autocompleteInput = $("#follow_tags");

      autocompleteInput.autoSuggest("#{tags_path}", {
        selectedItemProp: "name",
        searchObjProps: "name",
        asHtmlID: "tags",
        neverSubmit: true,
        retriveLimit: 10,
        selectionLimit: 5,
        minChars: 2,
        keyDelay: 200,
        startText: "",
        emptyText: "#{t('no_results')}",
        preFill: data
        });

      autocompleteInput.bind('keydown', function(evt){
        if(evt.keyCode == 13 || evt.keyCode == 9 || evt.keyCode == 32){
          evt.preventDefault();
          if( $('li.as-result-item.active').length == 0 ){
            $('li.as-result-item').first().click();
          }
        }
      });
    });

.span-5.leftNavBar
  #home_user_badge
    = owner_image_link
    %h3
      = current_user.first_name

  - unless has_completed_getting_started?
    .section
      %ul.left_nav
        %li
          = link_to t(".welcome"), getting_started_path, :class => "home_selector active"

  .section
    = render 'aspects/aspect_listings'

  .section
    = render 'tags/followed_tags_listings'

.span-13.append-1
  .stream_container
    %h2
      = welcome_text
    %h4
      = t(".community_welcome")

    %ul#getting_started
      %li.profile
        .getting_started_number
          %h3
            = @step += 1
        .content
          %h3
            = t(".who_are_you")

          .span-12
            %p
              We can speed things up a bit by 
              = link_to "hooking up your Facebook account", "auth/facebook?callback_url=#{getting_started_url}"
              to Diaspora.  We can pull your name and photo, and enable cross-positng.

          .span-12
            = form_for current_user.person.profile do |profile|
              .span-5
                = profile.text_field :first_name, :placeholder => t('profiles.edit.first_name')

              .span-7.last
                = render 'photos/new_profile_photo', :aspect => :getting_started, :person => current_user.person

              %br
              .span-6.prepend-6.last
                .right
                  = profile.submit "Save"

      %li.follow_interests
        .getting_started_number
          %h3
            = @step += 1
        .content
          %h3
            = t('.what_are_you_in_to')

          %p
            = t('.hashtag_explanation')

          .span-9
            = form_tag(tags_path, :method => 'get', :class => "tag_input search_form") do
              = text_field_tag 'follow_tags', nil

          .clearfix
            %br

      %li{:style => 'text-align:center;'}
        %p
          = link_to t('.awesome_take_me_to_diaspora'), getting_started_completed_path, :class => "button"