public
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/halorgium/mephisto.git
Search Repo:
mephisto / app / views / admin / assets / _widget.rhtml
100644 18 lines (18 sloc) 1.099 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<li id="<%= widget.dom_id("#{prefix}-widget") %>" class="widget<%= ' selected-widget' if @article && @article.assets.include?(widget) %>">
<% if prefix == 'attached' -%>
  <div>
    <%= link_to asset_image_for(widget), widget.public_filename %>
    <span>
      <%= text_field_tag :version, (widget.respond_to?(:label) ? widget.label : nil), :id => widget.dom_id("#{prefix}-widget-version"), :class => 'txt' %>
      <a href="#" class="label-widget" id="<%= widget.dom_id("label-#{prefix}-widget") %>">Save</a>
    </span>
  </div>
<% else -%>
  <%= link_to asset_image_for(widget), widget.public_filename %>
<% end -%>
  <a href="#"><%= image_tag('mephisto/icons/8-em-cross.png', :size => '16x16', :id => widget.dom_id("detach-#{prefix}-widget"),
        :style => 'display:none', :class => 'detach-widget') %></a>
  <a href="#"><%= image_tag('mephisto/icons/8-em-plus.png', :size => '16x16', :id => widget.dom_id("attach-#{prefix}-widget"),
        :style => 'display:none', :class => 'attach-widget') %></a>
</li>
<% if widget_counter.remainder(4).zero? && widget_counter > 0 %><br /><% end %>