public
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/halorgium/mephisto.git
mephisto / app / views / admin / articles / _shared_options.rhtml
100644 78 lines (73 sloc) 3.296 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<div class="sgroup">
  <h3>Publish in these sections</h3>
  <ul class="slist">
    <% @sections.each do |section| %>
      <li>
        <%= check_box_tag 'article[section_ids][]', section.id, @article.has_section?(section),
              :id => "article_section_ids_#{section.id}" %>
        <label for="article_section_ids_<%= section.id %>"><%= section.name %></label>
      </li>
    <% end %>
  </ul>
</div>
 
<div class="sgroup" id="filetabs">
  <ul class="stabs">
    <li id="tab-latest"><a href="#latest-files" class="selected" title="Latest files uploaded">Latest</a></li>
    <li id="tab-attached"><a href="#attached-files" title="Attached Assets">Attached</a></li>
    <li id="tab-search"><a href="#search-files" title="Search for files">Search</a></li>
    <li id="tab-files"><a href="#upload-files" title="Upload new files">Upload</a></li>
    <li id="tab-bucket"><a href="#bucket" title="Upload new files">Bucket</a></li>
  </ul>
  
  <div id="tabpanels">
    <div class="tabpanel" id="latest-files">
      <ul id="latest-assets" class="asset-list">
        <%= render :partial => "admin/assets/widget", :collection => @assets, :locals => { :prefix => 'latest' } %>
      </ul>
    </div>
    <div class="tabpanel" id="attached-files" style="display:none;">
      <ul id="attached-assets" class="asset-list">
        <%= render :partial => "admin/assets/widget", :collection => @article.assets, :locals => { :prefix => 'attached' } %>
      </ul>
    </div>
    <div class="tabpanel" id="search-files" style="display:none;">
      <label for="q" style="font-weight:bold;padding: 5px 0;">
        Search by tag or title
        <img id="spinner" src="/images/mephisto/spinner.gif" alt="spinner" style="display:none;vertical-align: middle" />
      </label>
      <input class="searchbox" type="text" size="30" name="q" id="search-files-q" />
      <input type="button" value="Search" onclick="TinyTab.callbacks['search-files']($F('search-files-q'))" />
      <ul id="search-assets" class="asset-list"></ul>
    </div>
    <div class="tabpanel" id="upload-files" style="display:none;">
      <p>
        <strong>1.</strong>
        <%= file_field_tag 'asset[uploaded_data]', :size => 15, :id => 'asset_uploaded_data' %>
      </p>
      <p><strong>2.</strong> <input type="button" value="Upload" onclick="Asset.upload('article-form');" /></p>
    </div>
    <div class="tabpanel" id="bucket" style="display:none;">
      <ul id="bucket-assets" class="asset-list">
        <% session[:bucket].each do |filename, values| -%>
        <li>
          <%= link_to(image_tag(*values), filename, :target => '_blank') %>
        </li>
        <% end unless session[:bucket].blank? %>
      </ul>
    </div>
  </div>
  
</div>
 
<div class="sgroup">
  <h3>Optional settings</h3>
  <dl class="sform">
      <dt><label for="article_filter">Format with: </label></dt>
      <dd>
        <select name="article[filter]" id="article_filter">
        <%= options_for_select(filter_options, @article.filter) %>
      </select>
    </dd>
    <dt><label for="article_comment_age">Comments</label></dt>
    <dd><%= form.select :comment_age, comment_expiration_options %></dd>
    <dt><label for="article_permalink">Permanent link:</label></dt>
    <dd><%= form.text_field :permalink %></dd>
  </dl>
</div>