summaryrefslogtreecommitdiffstats
path: root/app/views/news
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2006-12-05 20:45:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2006-12-05 20:45:04 +0000
commit96f83cc8f0f032554f771a59da22303cd473b878 (patch)
tree355a0d2ed653a5426c59ebf6a1fe65eba024b4d0 /app/views/news
parenteabc04d8368824965d3ac8de3fa84502e9c05d38 (diff)
downloadredmine-96f83cc8f0f032554f771a59da22303cd473b878.tar.gz
redmine-96f83cc8f0f032554f771a59da22303cd473b878.zip
trunk moved from /trunk/redmine to /trunk
git-svn-id: http://redmine.rubyforge.org/svn/trunk@67 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/news')
-rw-r--r--app/views/news/_form.rhtml20
-rw-r--r--app/views/news/edit.rhtml6
-rw-r--r--app/views/news/show.rhtml16
3 files changed, 42 insertions, 0 deletions
diff --git a/app/views/news/_form.rhtml b/app/views/news/_form.rhtml
new file mode 100644
index 000000000..2dcdc9f80
--- /dev/null
+++ b/app/views/news/_form.rhtml
@@ -0,0 +1,20 @@
+<%= error_messages_for 'news' %>
+<div class="box">
+<p><%= f.text_field :title, :required => true, :size => 60 %></p>
+<p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p>
+<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p>
+</div>
+
+<% unless $RDM_TEXTILE_DISABLED %>
+<%= javascript_include_tag 'jstoolbar' %>
+<script type="text/javascript">
+//<![CDATA[
+if (document.getElementById) {
+ if (document.getElementById('news_description')) {
+ var commentTb = new jsToolBar(document.getElementById('news_description'));
+ commentTb.draw();
+ }
+}
+//]]>
+</script>
+<% end %> \ No newline at end of file
diff --git a/app/views/news/edit.rhtml b/app/views/news/edit.rhtml
new file mode 100644
index 000000000..5e015c4c7
--- /dev/null
+++ b/app/views/news/edit.rhtml
@@ -0,0 +1,6 @@
+<h2><%=l(:label_news)%></h2>
+
+<% labelled_tabular_form_for :news, @news, :url => { :action => "edit" } do |f| %>
+<%= render :partial => 'form', :locals => { :f => f } %>
+<%= submit_tag l(:button_save) %>
+<% end %> \ No newline at end of file
diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml
new file mode 100644
index 000000000..91df09f0f
--- /dev/null
+++ b/app/views/news/show.rhtml
@@ -0,0 +1,16 @@
+<h2><%= @news.title %></h2>
+
+<p><em><%= @news.summary %><br />
+<%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
+<br />
+<%= textilizable auto_link @news.description %>
+
+<div style="float:right;">
+<% if authorize_for('news', 'destroy') %>
+ <%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %>
+ <%= submit_tag l(:button_delete) %>
+ <%= end_form_tag %>
+<% end %>
+</div>
+
+<%= link_to_if_authorized l(:button_edit), :controller => 'news', :action => 'edit', :id => @news %>