I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

profile_content.diff

Riceball LEE, 31 Aug 2011 03:16

Download (4.7 KB)

View differences:

app/models/extended_profile.rb (working copy)
39 39
        write_attribute(:linkedin, arg)
40 40
    end
41 41

  
42
    # added by riceball
43
    def content=(arg)
44
        if arg.empty?
45
            arg = nil
46
        end
47
        write_attribute(:content, arg)
48
    end
42 49
end
app/views/profile/_account.rhtml (working copy)
63 63
                     :class => profile[:linkedin].present? ? nil : 'empty',
64 64
                     :onfocus => "if (this.value == 'http://') { this.value = ''; this.className = ''; }") %>
65 65
</p>
66
<% 
67
# added by riceball 
68
%>
69
<p>
70
  <label for="profile_content"><%= l(:label_profile_content) %></label>
71
  <%= text_area_tag('profile[content]', user.profile[:content], :rows => 8, :cols=>60,:accesskey => accesskey(:edit), :class => 'wiki-edit')%>
72
  <%= wikitoolbar_for 'profile_content' %>
73
</p>
74

  
app/views/profile/_author.rhtml (working copy)
23 23
      <%= content_tag(:a, image_tag('linkedin.png', :plugin => 'extended_profile'), :href => user.profile[:linkedin]) %>
24 24
    <% end %>
25 25
  </p>
26
    <% 
27
    # added by riceball 
28
    if user.profile[:content].present? %>
29
      <h3><%=h l(:label_profile_content) %></h3>
30
      <div class="wiki">
31
        <%= textilizable user.profile[:content] %>
32
      </div>
33
    <% end %>
26 34
<% end %>
app/views/profile/_edit.rhtml (working copy)
44 44
  <label for="profile_linkedin"><%= l(:label_linkedin) %></label>
45 45
  <%= text_field_tag('profile[linkedin]', user.profile[:linkedin], :size => 30) %>
46 46
</p>
47
<% 
48
# added by riceball 
49
%>
50
<p>
51
  <label for="profile_content"><%= l(:label_profile_content) %></label>
52
  <%= text_area_tag('profile[content]', user.profile[:content], :rows => 8, :cols=>60,:accesskey => accesskey(:edit), :class => 'wiki-edit')%>
53
  <%= wikitoolbar_for 'profile_content' %>
54
</p>
55

  
app/views/profile/_view.rhtml (working copy)
9 9

  
10 10
<%= content_tag(:h3, l(:label_profile)) %>
11 11

  
12

  
12 13
<ul>
13 14
<% if user.profile[:company].present? %>
14 15
  <%= content_tag(:li, l(:label_company) + ': ' + h(user.profile[:company])) %>
......
36 37
  <%= content_tag(:li, l(:label_linkedin) + ': ' + content_tag(:a, h(user.profile[:linkedin]), :href => user.profile[:linkedin], :class => 'external linkedin')) %>
37 38
<% end %>
38 39
</ul>
40
<% 
41
# added by riceball
42
if user.profile[:content].present? 
43
%>
44
  <div class="wiki">
45
    <%= textilizable user.profile[:content] %>
46
  </div>
47
<% end %>
39 48

  
40 49
<% end %>
config/locales/zh.yml (working copy)
12 12
  label_twitter_username: Twitter username
13 13
  label_linkedin: LinkedIn
14 14
  label_require_project_of_interest: 感兴趣的项目必选
15
  label_profile_content: 简历
15 16

  
16 17
  field_extended_profile: 扩展个人轮廓
17 18
  field_company_site: 公司网址
......
22 23
  field_linkedin: LinkedIn
23 24

  
24 25
  sample_facebook_profile_id: e.g. 100000066953233
25
  sample_twitter_username: e.g. twitter
26
  sample_twitter_username: e.g. twitter
config/locales/en.yml (working copy)
11 11
  label_twitter_username: Twitter username
12 12
  label_linkedin: LinkedIn
13 13
  label_require_project_of_interest: Require project of interest
14
  label_profile_content: Profile
14 15

  
15 16
  field_extended_profile: Extended profile
16 17
  field_company_site: Company website
init.rb (working copy)
29 29
    author_url 'http://www.andriylesyuk.com'
30 30
    description 'Adds many new fields to user profile.'
31 31
    url 'http://projects.andriylesyuk.com/projects/redmine-profile'
32
    version '0.0.2'
32
    version '0.0.2.1'
33 33

  
34 34
    settings :default => { :require_project => true }, :partial => 'settings/profile'
35 35
end
Terms of use | Privacy policy