instiki/app/views/wiki/web_list.rhtml

29 lines
1,016 B
Plaintext
Raw Normal View History

2008-12-15 20:19:22 +01:00
<%- @title = "Wiki webs" -%>
2007-01-22 14:43:50 +01:00
<ul>
2008-12-15 20:19:22 +01:00
<%- @webs.each do |web| -%>
2007-01-22 14:43:50 +01:00
<li>
2008-12-15 20:19:22 +01:00
<%- if web.password -%>
<div class="web_protected">
<%- else -%>
<div class="web_normal">
<%- end -%>
<%= link_to(web.name, {:web => web.address, :action => 'show', :id => 'HomePage'}) %>
<%- if web.published? -%>
(<%= link_to_page 'HomePage', web, 'published version', :mode => 'publish' %>)
<%- end -%>
2007-01-22 14:43:50 +01:00
<div class="byline" style="margin-bottom: 0px">
<%= web.pages.size %> page<% if web.pages.size != 1 %>s<% end %> by <%= web.authors.size %> author<% if web.authors.size != 1 %>s<% end %>
2008-12-15 20:19:22 +01:00
- Last Update: <%= web.last_page.nil? ? format_date(web.created_at) : format_date(web.last_page.revised_at) %><br/>
<%- if ! web.last_page.nil? -%>
Last Document: <%= link_to_page(web.last_page.name,web) %>
<%= web.last_page.revisions? ? "Revised" : "Created" %> by <%= author_link(web.last_page) %> (<%= web.last_page.current_revision.ip %>)
2008-12-15 20:19:22 +01:00
<%- end -%>
2007-01-22 14:43:50 +01:00
</div>
</div>
</li>
2008-12-15 20:19:22 +01:00
<%- end -%>
2007-01-22 14:43:50 +01:00
</ul>