add quick link to change user password, but it's not work

This commit is contained in:
Rueshyna 2012-11-28 23:44:43 +08:00
parent 6ed1dd0cc6
commit 9e2d6cfcdd
1 changed files with 99 additions and 101 deletions

View File

@ -1,105 +1,103 @@
<header id="orbit-bar" class="navbar"> <header id="orbit-bar" class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container clear"> <div class="container clear">
<div class="dropdown orbit-logo pull-left"> <div class="dropdown orbit-logo pull-left">
<% if !current_user.nil? %> <% if !current_user.nil? %>
<%= render :partial=>"layouts/member_orbit_menu"%> <%= render :partial=>"layouts/member_orbit_menu"%>
<% else %> <% else %>
<%= render :partial=>"layouts/guest_orbit_menu"%> <%= render :partial=>"layouts/guest_orbit_menu"%>
<% end -%> <% end -%>
</div> </div>
<ul class="nav"> <ul class="nav">
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li> <li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>
<li><%= link_to t(:desktop), desktop_path, :class => 'orbit-bar-desktop' %></li> <li><%= link_to t(:desktop), desktop_path, :class => 'orbit-bar-desktop' %></li>
</ul> </ul>
<ul class="nav pull-right"> <ul class="nav pull-right">
<li class="dropdown language"> <li class="dropdown language">
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown">language</a> <a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown">language</a>
<ul class="dropdown-menu language-menu"> <ul class="dropdown-menu language-menu">
<% @site_in_use_locales.each do |locale| %> <% @site_in_use_locales.each do |locale| %>
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %> <%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
<% end %> <% end %>
</ul> </ul>
</li>
<li class="search clear" title="<%= t :search_google %>">
<a class="orbit-bar-search" href="#">search</a>
<form class="navbar-search" method="get" action="http://www.google.com/custom">
<input type="hidden" name="client" value="pub-&amp" />
<input type="hidden" name="ie" id="ie" value="utf-8" />
<input type="hidden" name="oe" id="oe" value="utf-8" />
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'>
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'>
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_nccu) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
</form>
</li>
<% if user_signed_in? %>
<li class="dropdown active">
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
<img class="member-img" src="/assets/person.png" />
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
<span class="member-name"><%= current_user.name %></span>
</a>
<ul class="dropdown-menu account-menu">
<li>
</a>
<%= link_to content_tag(:i, nil, :class => 'icons-wrench') + ' ' + t(:account_settings), desktop_path+"#settings-account" %>
</li>
<li>
<a class="orbit-bar-desktop" href="#">
<i class="icons-desktop"></i>
<%= t(:desktop) %>
</a>
</li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + ' ' + t(:logout), destroy_user_session_path %></li>
<li class="divider"></li>
<li>
<a href="#">
<i class="icons-help"></i>
<%= t(:help) %>
</a>
</li>
</ul>
</li> </li>
<% else %>
<li class="dropdown bar-login">
<a class="dropdown-toggle orbit-bar-member" href="#"><%= t(:login) %></a>
<div class="dropdown-menu">
<ul class="log">
<li class="title hide"></li>
<li class="search clear" title="<%= t :search_google %>"> <%= form_for :user, :url => user_session_path do |f| %>
<a class="orbit-bar-search" href="#">search</a> <li>
<form class="navbar-search" method="get" action="http://www.google.com/custom"> <div class="input-prepend">
<input type="hidden" name="client" value="pub-&amp" /> <span class="add-on"><i class="icon-user"></i></span>
<input type="hidden" name="ie" id="ie" value="utf-8" /> <%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
<input type="hidden" name="oe" id="oe" value="utf-8" /> </div>
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" /> </li>
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'> <li>
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'> <div class="input-prepend">
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_nccu) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%> <span class="add-on"><i class="icon-lock"></i></span>
</form> <%= f.password_field :password, :class => 'span2', :placeholder => t(:password), :size => 16 %>
</li> </div>
<% if user_signed_in? %> </li>
<li class="dropdown active"> <li class="clear hide">
<a class="orbit-bar-account" href="#" data-toggle="dropdown"> <%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
<img class="member-img" src="/assets/person.png" /> </li>
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %> <li>
<span class="member-name"><%= current_user.name %></span> <%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
</a>
<ul class="dropdown-menu account-menu">
<li>
<a href="#">
<i class="icons-wrench"></i>
<%= t(:account_settings) %>
</a>
</li>
<li>
<a class="orbit-bar-desktop" href="#">
<i class="icons-desktop"></i>
<%= t(:desktop) %>
</a>
</li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + ' ' + t(:logout), destroy_user_session_path %></li>
<li class="divider"></li> </li>
<li> <li class="divider hide"><span><%= t(:or_lower) %></span></li>
<a href="#"> <% end %>
<i class="icons-help"></i> </ul>
<%= t(:help) %> <%#= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %>
</a> </div>
</li> </li>
</ul> <% end %>
</li> </ul>
<% else %> </div>
<li class="dropdown bar-login"> </div>
<a class="dropdown-toggle orbit-bar-member" href="#"><%= t(:login) %></a>
<div class="dropdown-menu">
<ul class="log">
<li class="title hide"></li>
<%= form_for :user, :url => user_session_path do |f| %>
<li>
<div class="input-prepend">
<span class="add-on"><i class="icon-user"></i></span>
<%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
</div>
</li>
<li>
<div class="input-prepend">
<span class="add-on"><i class="icon-lock"></i></span>
<%= f.password_field :password, :class => 'span2', :placeholder => t(:password), :size => 16 %>
</div>
</li>
<li class="clear hide">
<%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
</li>
<li>
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
</li>
<li class="divider hide"><span><%= t(:or_lower) %></span></li>
<% end %>
</ul>
<%#= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %>
</div>
</li>
<% end %>
</ul>
</div>
</div>
</header> </header>