_textile_media.rhtml
2.72 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
<div class='textile-editor-sidebar'>
<div class='textile-editor-sidebar-box'>
<p>
<strong><%= _('Textile markup quick reference') %></strong>
<%= link_to(_('(show)'), '#', :id => 'textile-quickref-show') %>
<%= link_to(_('(hide)'), '#', :id => 'textile-quickref-hide', :style => 'display: none') %>
</p>
<div id='textile-quickref' style='display: none;'>
<p><%= _('Simple formatting:') %> <code>_<%= _('italics') %>_</code> <code>*<%= _('bold') %>*</code>, <code>-<%= _('striked')%>-</code>.</p>
<p><%= _('Links:') %> <code>"Noosfero":http://noosfero.org/</code></p>
<p><%= _('Images:') %> <code>!http://example.com/image.png!</code></p>
<p><%= _('Bullet lists:') %></p>
<pre>* <%= _('first item') %>
* <%= _('second item') %></pre>
<p><%= _('Numbered lists:') %></p>
<pre># <%= _('first item') %>
# <%= _('second item') %></pre>
<p><%= _('See also a more complete <a href="%s">Textile Reference</a>') % 'http://redcloth.org/hobix.com/textile/' %></p>
</div>
</div>
<div class='textile-editor-sidebar-box' id='media-upload-box'>
<p><strong>Media upload</strong></p>
<div id='media-upload-form'>
<% form_tag({ :action => 'media_upload' }, :multipart => true) do |f| %>
<div class='formfield'>
<%# TODO duplicated from partial upload_file_form %>
<%= labelled_form_field(_('Choose folder to upload files:'), select_tag('parent_id', options_for_select([[profile.identifier, '']] + profile.folders.collect {|f| [ profile.identifier + '/' + f.full_name, f.id ] }))) %>
</div>
<p><%= file_field_tag('file1') %></p>
<p><%= file_field_tag('file2') %></p>
<p><%= file_field_tag('file3') %></p>
<% button_bar do %>
<%= submit_button(:save, _('Upload')) %>
<% end %>
<% end %>
</div>
<div id='media-upload-results' class='media-list-results' style='display: none'>
<ul>
</ul>
<p>
<em><%= _('Drag item names to the text to add their URL') %></em>
</p>
<p><%= link_to(_('Upload more files ...'), '#', :id => 'media-upload-more-files')%></p>
</div>
</div>
<div class='textile-editor-sidebar-box'>
<p><strong>Media search</strong></p>
<% form_tag({ :action => 'search' }) do %>
<span class='formfield'>
<input name='q' type='text' id='media-search-query' style='width: 250px;'/>
</span>
<%= submit_button :search, _('Search'), :id => 'media-search-button' %>
<% end %>
</form>
<div id='media-search-results' class='media-list-results' style='display: none'>
<ul>
</ul>
<p>
<em><%= _('Drag item names to the text to add their URL') %></em>
</p>
</div>
</div>
</div>