web list does not show a link to a published version if it has none [Jesse Newland]

visual display if webs are pass-protected (div background)
This commit is contained in:
Matthias Tarasiewicz 2007-01-16 07:23:53 +00:00
parent 8bfe83fa20
commit 1005d92bd1
3 changed files with 12 additions and 9 deletions

View file

@ -1,18 +1,21 @@
<% @title = "Wiki webs" %>
<ul>
<% @webs.each do |web| %>
<li>
<% if web.published %>
<%= link_to_page 'HomePage', web, web.name, :mode => 'publish' %>
(read-only) /
<%= link_to_page 'HomePage', web, 'editable version', :mode => 'show' %> (requires login)
<% else %>
<% if web.password %> <div style="padding: 4px; background-image: url(/images/bg_protected.gif)">
<% else %> <div style="padding: 4px;"> <% end %>
<span>
<%= link_to_page 'HomePage', web, web.name, :mode => 'show' %>
<% if web.published? %>
(<%= link_to_page 'HomePage', web, 'published version', :mode => 'publish' %>)
<% end %>
<div class="byline" style="margin-bottom: 0px">
<%= web.pages.length %> pages by <%= web.authors.length %> authors
</div>
</li>
</span>
</div><br>
<% end %>
</ul>

BIN
public/images/bg_normal.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 B