aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-07-13 08:06:51 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-07-13 08:21:28 +0100
commitcb6db9d6bc15ef2976f09788a2e1ed99a2b38daa (patch)
tree74153586779019f1347cc492e13fe276cbc9badb
parentdfbc1b273740da9ec6727b10d73cc82cde776e10 (diff)
Factor out showing user info so it can easily be specialised in a theme
-rw-r--r--app/views/user/_show_user_info.rhtml20
-rw-r--r--app/views/user/show.rhtml20
2 files changed, 21 insertions, 19 deletions
diff --git a/app/views/user/_show_user_info.rhtml b/app/views/user/_show_user_info.rhtml
new file mode 100644
index 000000000..5dfecee1e
--- /dev/null
+++ b/app/views/user/_show_user_info.rhtml
@@ -0,0 +1,20 @@
+
+ <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>
+ <div class="user_about_me">
+ <img class="comment_quote" src="/images/quote.png" alt="">
+ <%= @display_user.get_about_me_for_html_display %>
+ <% if @is_you %>
+ (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
+ <% end %>
+ </div>
+ <% end %>
+
+ <% if @is_you %>
+ <p id="user_change_password_email">
+ <% if @display_user.profile_photo %>
+ <%= link_to _('Change profile photo'), set_profile_photo_url() %> |
+ <% end %>
+ <%= link_to _('Change your password'), signchangepassword_url() %> |
+ <%= link_to _('Change your email'), signchangeemail_url() %>
+ </p>
+ <% end %>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index ea3ae90ae..12a9d3f74 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -93,25 +93,7 @@
</div>
<% end %>
- <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>
- <div class="user_about_me">
- <img class="comment_quote" src="/images/quote.png" alt="">
- <%= @display_user.get_about_me_for_html_display %>
- <% if @is_you %>
- (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
- <% end %>
- </div>
- <% end %>
-
- <% if @is_you %>
- <p id="user_change_password_email">
- <% if @display_user.profile_photo %>
- <%= link_to _('Change profile photo'), set_profile_photo_url() %> |
- <% end %>
- <%= link_to _('Change your password'), signchangepassword_url() %> |
- <%= link_to _('Change your email'), signchangeemail_url() %>
- </p>
- <% end %>
+ <%= render :partial => 'user/show_user_info' %>
<% if not @is_you %>
<p id="user_not_logged_in">