Commit 53ac5fd213be38abf044fa589410df8b94e782f9
1 parent
fece5528
Exists in
master
and in
29 other branches
Encapsulate user code
Showing
2 changed files
with
26 additions
and
25 deletions
Show diff stats
... | ... | @@ -0,0 +1,24 @@ |
1 | +<div id="user"> | |
2 | + <span class='logged-in' style='display: none;'> | |
3 | + <%= usermenu_logged_in %> | |
4 | + </span> | |
5 | + <span class='not-logged-in' style='display: none'> | |
6 | + | |
7 | + <%= _("<span class='login'>%s</span>") % thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login') %> | |
8 | + <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %> | |
9 | + | |
10 | + <div id='inlineLoginBox' style='display: none;'> | |
11 | + <%= render :file => 'account/login', :locals => { :is_thickbox => true } %> | |
12 | + </div> | |
13 | + | |
14 | + <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> | |
15 | + <%= _("<span class='or'>or</span> <span class='signup'>%s</span>") % link_to('<strong>' + _('Sign up') + '</strong>', :controller => 'account', :action => 'signup')%> | |
16 | + <% end %> | |
17 | + | |
18 | + </span> | |
19 | + <form action="/search" class="search_form" method="get" class="clean"> | |
20 | + <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> | |
21 | + <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> | |
22 | + <%= javascript_tag 'jQuery("#user form input").hint();' %> | |
23 | + </form> | |
24 | +</div><!-- end id="user" --> | ... | ... |
app/views/layouts/application-ng.rhtml
... | ... | @@ -37,31 +37,8 @@ |
37 | 37 | <div id='theme-header'> |
38 | 38 | <%= theme_header %> |
39 | 39 | </div> |
40 | - <div id="wrap-2"> | |
41 | - <div id="user"> | |
42 | - <span class='logged-in' style='display: none;'> | |
43 | - <%= usermenu_logged_in %> | |
44 | - </span> | |
45 | - <span class='not-logged-in' style='display: none'> | |
46 | - | |
47 | - <%= _("<span class='login'>%s</span>") % thickbox_inline_popup_link('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login') %> | |
48 | - <%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_eval(&content) }.join("") %> | |
49 | - | |
50 | - <div id='inlineLoginBox' style='display: none;'> | |
51 | - <%= render :file => 'account/login', :locals => { :is_thickbox => true } %> | |
52 | - </div> | |
53 | - | |
54 | - <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> | |
55 | - <%= _("<span class='or'>or</span> <span class='signup'>%s</span>") % link_to('<strong>' + _('Sign up') + '</strong>', :controller => 'account', :action => 'signup')%> | |
56 | - <% end %> | |
57 | - | |
58 | - </span> | |
59 | - <form action="/search" class="search_form" method="get" class="clean"> | |
60 | - <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> | |
61 | - <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> | |
62 | - <%= javascript_tag 'jQuery("#user form input").hint();' %> | |
63 | - </form> | |
64 | - </div><!-- end id="user" --> | |
40 | + <div id="wrap-2">' | |
41 | + <%= render :partial => 'layouts/user' %> | |
65 | 42 | |
66 | 43 | <h1 id="site-title"> |
67 | 44 | <%= theme_site_title %> | ... | ... |