Remove extra double quote in sub_menu

Fix web link widget pagination
This commit is contained in:
chris 2012-12-28 11:10:33 +08:00
parent bab8328029
commit 17d93409b3
4 changed files with 32 additions and 27 deletions

View File

@ -1,7 +1,7 @@
<% if @menu_page && @menu_page.visible_children.size > 0 %> <% if @menu_page && @menu_page.visible_children.size > 0 %>
<div class='category_list'> <div class='category_list'>
<h3 class='h3'><%= @menu_page.title %></h3> <h3 class='h3'><%= @menu_page.title %></h3>
<ul class='list'>" <ul class='list'>
<% @menu_page.visible_children.each do |child| %> <% @menu_page.visible_children.each do |child| %>
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>"> <li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a> <a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>

View File

@ -0,0 +1,27 @@
<% if @current_category %>
<h1 class="h1"><%= @current_category.title + " " + t(:list_lower) %></h1>
<% elsif @tag %>
<h1 class="h1"><%= @tag[I18n.locale] + " " + t(:list_lower) %></h1>
<% else %>
<h1 class="h1"><%= t('list.link') %></h1>
<% end %>
<table class="table table-bordered">
<tbody>
<tr>
<th><%= t(:category) %></th>
<th><%= t(:name) %></th>
</tr>
<% @web_links.each do |post| %>
<tr>
<td><%= post.web_link_category.title rescue nil %></td>
<td>
<%= link_to post.title, post.url, {:target => '_blank', :title => post.title} %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%#= paginate @web_links, :params => {:inner => 'true'}, :remote => true %>
<%= paginate @web_links, :params => {:inner => 'false'}, :remote => true %>

View File

@ -1,26 +1,3 @@
<% if @current_category %> <div id="web_link_widget">
<h1 class="h1"><%= @current_category.title + " " + t(:list_lower) %></h1> <%= render 'index' %>
<% elsif @tag %> </div>
<h1 class="h1"><%= @tag[I18n.locale] + " " + t(:list_lower) %></h1>
<% else %>
<h1 class="h1"><%= t('list.link') %></h1>
<% end %>
<table class="table table-bordered">
<tbody>
<tr>
<th><%= t(:category) %></th>
<th><%= t(:name) %></th>
</tr>
<% @web_links.each do |post| %>
<tr>
<td><%= post.web_link_category.title rescue nil %></td>
<td>
<%= link_to post.title, post.url, {:target => '_blank', :title => post.title} %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @web_links, :params => {:inner => 'false'} %>

View File

@ -0,0 +1 @@
$('#web_link_widget').html("<%= j render 'index' %>")