summaryrefslogtreecommitdiffstats
path: root/app/views/documents
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-27 12:38:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-27 12:38:29 +0000
commit70374d084e19dba21e83e8a360a62ff0168ff207 (patch)
tree8db177647094fbbd16d8a242827579d949d40d1e /app/views/documents
parentf335e943ad807de82f8ff860922d9c9aa2f3a3bc (diff)
downloadredmine-70374d084e19dba21e83e8a360a62ff0168ff207.tar.gz
redmine-70374d084e19dba21e83e8a360a62ff0168ff207.zip
Slight views refactoring
git-svn-id: http://redmine.rubyforge.org/svn/trunk@548 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/documents')
-rw-r--r--app/views/documents/_form.rhtml14
-rw-r--r--app/views/documents/show.rhtml4
2 files changed, 2 insertions, 16 deletions
diff --git a/app/views/documents/_form.rhtml b/app/views/documents/_form.rhtml
index bd6e6cc7e..ee7c289f1 100644
--- a/app/views/documents/_form.rhtml
+++ b/app/views/documents/_form.rhtml
@@ -14,16 +14,4 @@
<!--[eoform:document]-->
</div>
-<% if Setting.text_formatting == 'textile' %>
-<%= javascript_include_tag 'jstoolbar' %>
-<script type="text/javascript">
-//<![CDATA[
-if (document.getElementById) {
- if (document.getElementById('document_description')) {
- var commentTb = new jsToolBar(document.getElementById('document_description'));
- commentTb.draw();
- }
-}
-//]]>
-</script>
-<% end %> \ No newline at end of file
+<%= wikitoolbar_for 'document_description' %>
diff --git a/app/views/documents/show.rhtml b/app/views/documents/show.rhtml
index 9f530539f..74b8f343d 100644
--- a/app/views/documents/show.rhtml
+++ b/app/views/documents/show.rhtml
@@ -30,9 +30,7 @@
<% if authorize_for('documents', 'add_attachment') %>
<p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
<% form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
- <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
- <%= image_to_function "add.png", "addFileField();return false" %></label>
- <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
+ <%= render :partial => 'attachments/form' %>
<%= submit_tag l(:button_add) %>
<% end %>
<% end %>