[英]Rails rendering ul li list with will_paginate
I'm using will_paginate in my rails application, it's working fine but I would like to use ul li list for my webdesigner layout. 我在Rails应用程序中使用will_paginate,它工作正常,但我想在Webdesigner布局中使用ul li list。 Actually with my code, it's only rendering
其实我的代码只是渲染
my view : 我的观点 :
<div class="pagination">
<ul><li><%= will_paginate @organizations %></li></ul>
</div>
My source code: 我的源代码:
<ul><li><div class="pagination">
<span class="previous_page disabled">← Previous</span>
<em>1</em>
<a rel="next" href="/organizations?page=2&search=2&submit_search=ok">2</a>
<a href="/organizations?page=3&search=2&submit_search=ok">3</a>
<a class="next_page" rel="next" href="/organizations?page=2&search=2&submit_search=ok">Next →</a>
</div></ul>/<li>
I would like to have this kind of result : 我想要这样的结果:
<div class="pagination">
<ul>
<li class="prev"><a href="#"><span>Prev</span></a></li>
<li><a href="#"><span>1</span></a></li>
<li><a href="#"><span>2</span></a></li>
<li><a href="#"><span>3</span></a></li>
<li class="next"><a href="#"><span>Next</span></a></li>
</ul>
</div>
How can it be done? 如何做呢?
The will_paginate docs link to an example that is nearly identical to what you're asking for here. will_paginate docs 链接到一个示例 , 该示例几乎与您在此处要求的相同。
Scroll down to "Doing it Your Way." 向下滚动到“按自己的方式做”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.