public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
add article markup field selector

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1216 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sun Jun 11 08:54:26 -0700 2006
commit  22af6833a79b492923b81ae77b52868c9f2059b8
tree    620586d156a819615f42a2617c9006066e132d2c
parent  220f8b8ec813c56f5228efbef858a8141bc18e37
...
1
2
3
4
5
...
1
 
 
 
2
0
@@ -1,5 +1,2 @@
0
 module Admin::UsersHelper
0
- def filter_options
0
- [['Plain HTML', ''], ['Textile', 'textile_filter'], ['Markdown', 'markdown_filter'], ['Markdown with Smarty Pants', 'smartypants']]
0
- end
0
 end
...
17
18
19
20
 
 
 
 
 
21
...
17
18
19
 
20
21
22
23
24
25
0
@@ -17,5 +17,9 @@ module ApplicationHelper
0
   def yesterdays_short_date
0
     Time.now.utc.yesterday.to_ordinalized_s(:stub)
0
   end
0
-
0
+
0
+ def filter_options
0
+ [['Plain HTML', ''], ['Textile', 'textile_filter'], ['Markdown', 'markdown_filter'], ['Markdown with Smarty Pants', 'smartypants']]
0
+ end
0
+
0
 end
...
32
33
34
 
 
 
 
 
 
 
35
36
37
...
41
42
43
 
44
45
46
...
32
33
34
35
36
37
38
39
40
41
42
43
44
...
48
49
50
51
52
53
54
0
@@ -32,6 +32,13 @@
0
   <dd><%= datetime_select 'article', 'published_at', :discard_year => true %></dd>
0
   <dt><label for="article_permalink">Permanent link</label></dt>
0
   <dd><%= form.text_field :permalink %></dd>
0
+ <dt><label for="article_filters">Article Markup</label></dt>
0
+ <dd>
0
+ <select name="article[filters][]" id="article_filters">
0
+ <%= options_for_select(filter_options, (@article.filters || []).first.to_s) %>
0
+ </select>
0
+ </dd>
0
+<% if false -%>
0
   <dt><strong><%= link_to_function("Invite people to review and revise this article&hellip;", "Element.toggle('invites');", :id => 'invite') %></strong></dt>
0
   <dd id="invites" class="indent-box" style="display:none;">
0
     <p class="hint">
0
@@ -41,6 +48,7 @@
0
     <%= text_area_tag 'emails', '', :rows => 4, :style => 'width:100%;' %>
0
     <p style="padding:5px;"><%= link_to_function 'Cancel', "Element.hide('invites');" %></p>
0
     </dd>
0
+<% end -%>
0
 </dl>
0
 <!-- /end optional fields -->
0
 
...
14
15
16
 
17
18
19
20
21
...
32
33
34
35
36
 
37
38
...
14
15
16
17
18
 
19
20
21
...
32
33
34
 
35
36
37
38
0
@@ -14,8 +14,8 @@
0
 
0
 
0
 <% content_for :sidebar do %>
0
+ <% if @article.versions.any? -%>
0
   <div class="sgroup">
0
- <% if @article.versions.any? -%>
0
     <h3>Revisions</h3>
0
     <ul id="revisions">
0
     <% @article.versions.find(:all, :order => 'updated_at DESC', :limit => 10).each do |version| -%>
0
@@ -32,6 +32,6 @@
0
       </li>
0
     <% end -%>
0
     </ul>
0
- <% end -%>
0
   </div>
0
+ <% end -%>
0
 <% end %>
0
\ No newline at end of file

Comments

    No one has commented yet.