You are here: Home > Latest news from Darcs > Displays image file names in attachment area

Revision 20080729222051-9043f-c4805d...

Displays image file names in attachment area

app/views/wiki/_attached_images.rhtml
public/stylesheets/motiro.css

Changes to _attached_images.rhtml

1
<div class="attachments">
<div class="attachments">
1
2
  <h1><%= 'Images attached to this page'.t %></h1>
  <h1><%= 'Images attached to this page'.t %></h1>
2
3
  <% @page.images.each do |img| %>
  <% @page.images.each do |img| %>
3
4
    <%= link_to(image_tag(img.public_filename(:thumb)),
    <div class="figure">
4
5
                img.public_filename) %>
      <p>
5
 
        <%= link_to(image_tag(img.public_filename(:thumb)),
6
 
                    img.public_filename) %>
7
 
      </p>
8
 
      <div><%= img.filename -%></div>
9
 
    </div>
10
6
  <% end %>
  <% end %>
11
7
</div>
</div>
12
8
13

Changes to motiro.css

88
div.attachments { border-top: 1px dotted #9C9C9C; }
div.attachments { border-top: 1px dotted #9C9C9C; }
88
89
div.attachments h1 { font-size: 1.4em; }
div.attachments h1 { font-size: 1.4em; }
89
90
90
 
div.figure p { text-align: center; }
91
 
div.figure div { font: normal 8pt monospace; }
92
 
div.figure {
93
 
  display: inline-table;
94
 
  margin: 0 .2em .4em .2em;
95
 
}
96
 
97
91
span#revision {
span#revision {
98
92
  color: #808080;
  color: #808080;
99
93
  font-size: 1em;
  font-size: 1em;
100