instiki/app/views/wiki/web_list.rhtml
Jacques Distler a503e2b8ac Gentler
Be a little gentler in recovering from Instiki::ValidationErrors, when saving a page.
Previously, we threw away all the user's changes upon the redirect. Now we attempt
to salvage what he wrote.
2008-12-17 00:07:21 -06:00

28 lines
1 KiB
Text

<%- @title = "Wiki webs" -%>
<ul>
<%- @webs.each do |web| -%>
<li>
<%- 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 -%>
<div class="byline" style="margin-bottom: 0px">
<%= web.pages.length %> page<% if web.pages.length != 1 %>s<% end %> by <%= web.authors.length %> author<% if web.authors.length != 1 %>s<% end %>
- 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).purify %> (<%= web.last_page.current_revision.ip %>)
<%- end -%>
</div>
</div>
</li>
<%- end -%>
</ul>