my_wiki_generator 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/my_wiki/grep.txt +238 -0
  2. data/my_wiki/my_wiki_generator.rb +248 -0
  3. data/my_wiki/templates/POST_GENERATION_REMINDER +1 -0
  4. data/my_wiki/templates/app/controllers/application.rb +75 -0
  5. data/my_wiki/templates/app/controllers/content_history_controller.rb +49 -0
  6. data/my_wiki/templates/app/controllers/login_controller.rb +93 -0
  7. data/my_wiki/templates/app/controllers/my_wiki_admin_controller.rb +26 -0
  8. data/my_wiki/templates/app/controllers/my_wiki_controller.rb +250 -0
  9. data/my_wiki/templates/app/controllers/page_admin_controller.rb +51 -0
  10. data/my_wiki/templates/app/controllers/user_admin_controller.rb +34 -0
  11. data/my_wiki/templates/app/helpers/application_helper.rb +3 -0
  12. data/my_wiki/templates/app/helpers/content_history_helper.rb +2 -0
  13. data/my_wiki/templates/app/helpers/login_helper.rb +2 -0
  14. data/my_wiki/templates/app/helpers/my_wiki_admin_helper.rb +2 -0
  15. data/my_wiki/templates/app/helpers/my_wiki_helper.rb +94 -0
  16. data/my_wiki/templates/app/helpers/page_admin_helper.rb +2 -0
  17. data/my_wiki/templates/app/helpers/user_admin_helper.rb +2 -0
  18. data/my_wiki/templates/app/models/attachment.rb +55 -0
  19. data/my_wiki/templates/app/models/content.rb +32 -0
  20. data/my_wiki/templates/app/models/content_history.rb +49 -0
  21. data/my_wiki/templates/app/models/content_sweeper.rb +7 -0
  22. data/my_wiki/templates/app/models/my_wiki_mailer.rb +29 -0
  23. data/my_wiki/templates/app/models/role.rb +18 -0
  24. data/my_wiki/templates/app/models/setting.rb +7 -0
  25. data/my_wiki/templates/app/models/user.rb +60 -0
  26. data/my_wiki/templates/app/views/content_history/_form.rhtml +19 -0
  27. data/my_wiki/templates/app/views/content_history/edit.rhtml +9 -0
  28. data/my_wiki/templates/app/views/content_history/list.rhtml +27 -0
  29. data/my_wiki/templates/app/views/content_history/new.rhtml +8 -0
  30. data/my_wiki/templates/app/views/content_history/show.rhtml +21 -0
  31. data/my_wiki/templates/app/views/layouts/my_wiki.rhtml +105 -0
  32. data/my_wiki/templates/app/views/login/edit.rhtml +25 -0
  33. data/my_wiki/templates/app/views/login/login.rhtml +23 -0
  34. data/my_wiki/templates/app/views/login/logout.rhtml +10 -0
  35. data/my_wiki/templates/app/views/login/signup.rhtml +23 -0
  36. data/my_wiki/templates/app/views/login/welcome.rhtml +13 -0
  37. data/my_wiki/templates/app/views/my_wiki/_form.rhtml +11 -0
  38. data/my_wiki/templates/app/views/my_wiki/css.rhtml +224 -0
  39. data/my_wiki/templates/app/views/my_wiki/diff.rhtml +4 -0
  40. data/my_wiki/templates/app/views/my_wiki/edit.rhtml +34 -0
  41. data/my_wiki/templates/app/views/my_wiki/fileinfo.rhtml +22 -0
  42. data/my_wiki/templates/app/views/my_wiki/list.rhtml +1 -0
  43. data/my_wiki/templates/app/views/my_wiki/mails.rhtml +1 -0
  44. data/my_wiki/templates/app/views/my_wiki/new.rhtml +6 -0
  45. data/my_wiki/templates/app/views/my_wiki/recent.rhtml +3 -0
  46. data/my_wiki/templates/app/views/my_wiki/search.rhtml +5 -0
  47. data/my_wiki/templates/app/views/my_wiki/search_result.rhtml +10 -0
  48. data/my_wiki/templates/app/views/my_wiki/show.rhtml +31 -0
  49. data/my_wiki/templates/app/views/my_wiki_admin/index.rhtml +5 -0
  50. data/my_wiki/templates/app/views/my_wiki_admin/setting.rhtml +64 -0
  51. data/my_wiki/templates/app/views/my_wiki_mailer/inform.rhtml +3 -0
  52. data/my_wiki/templates/app/views/page_admin/_form.rhtml +22 -0
  53. data/my_wiki/templates/app/views/page_admin/edit.rhtml +9 -0
  54. data/my_wiki/templates/app/views/page_admin/list.rhtml +55 -0
  55. data/my_wiki/templates/app/views/page_admin/new.rhtml +8 -0
  56. data/my_wiki/templates/app/views/page_admin/show.rhtml +8 -0
  57. data/my_wiki/templates/app/views/user_admin/_form.rhtml +10 -0
  58. data/my_wiki/templates/app/views/user_admin/change_password.rhtml +9 -0
  59. data/my_wiki/templates/app/views/user_admin/list.rhtml +25 -0
  60. data/my_wiki/templates/app/views/user_admin/signup.rhtml +20 -0
  61. data/my_wiki/templates/components/admin/menu/menu.rhtml +5 -0
  62. data/my_wiki/templates/components/admin/menu_controller.rb +3 -0
  63. data/my_wiki/templates/components/list/list/list.rhtml +11 -0
  64. data/my_wiki/templates/components/list/list_controller.rb +11 -0
  65. data/my_wiki/templates/components/sidebar/sidebar/show.rhtml +7 -0
  66. data/my_wiki/templates/components/sidebar/sidebar_controller.rb +9 -0
  67. data/my_wiki/templates/config/routes.rb +35 -0
  68. data/my_wiki/templates/db/migrate/001_my_wiki_migration.rb +75 -0
  69. data/my_wiki/templates/lib/diff/lcs.rb +1105 -0
  70. data/my_wiki/templates/lib/diff/lcs/array.rb +21 -0
  71. data/my_wiki/templates/lib/diff/lcs/block.rb +51 -0
  72. data/my_wiki/templates/lib/diff/lcs/callbacks.rb +322 -0
  73. data/my_wiki/templates/lib/diff/lcs/change.rb +169 -0
  74. data/my_wiki/templates/lib/diff/lcs/hunk.rb +257 -0
  75. data/my_wiki/templates/lib/diff/lcs/ldiff.rb +226 -0
  76. data/my_wiki/templates/lib/diff/lcs/string.rb +19 -0
  77. data/my_wiki/templates/lib/login_system.rb +87 -0
  78. data/my_wiki/templates/lib/markup/simple_markup.rb +489 -0
  79. data/my_wiki/templates/lib/markup/simple_markup/fragments.rb +329 -0
  80. data/my_wiki/templates/lib/markup/simple_markup/inline.rb +338 -0
  81. data/my_wiki/templates/lib/markup/simple_markup/lines.rb +151 -0
  82. data/my_wiki/templates/lib/markup/simple_markup/preprocess.rb +68 -0
  83. data/my_wiki/templates/lib/markup/simple_markup/to_flow.rb +188 -0
  84. data/my_wiki/templates/lib/markup/simple_markup/to_html.rb +302 -0
  85. data/my_wiki/templates/lib/markup/simple_markup/to_latex.rb +333 -0
  86. data/my_wiki/templates/lib/my_wiki_plugin.rb +60 -0
  87. data/my_wiki/templates/lib/my_wiki_plugins/christel.rb +5 -0
  88. data/my_wiki/templates/lib/my_wiki_plugins/join.rb +3 -0
  89. data/my_wiki/templates/lib/my_wiki_plugins/link_to_attach.rb +17 -0
  90. data/my_wiki/templates/lib/my_wiki_plugins/recent.rb +8 -0
  91. data/my_wiki/templates/public/javascripts/my_wiki.js +8 -0
  92. data/my_wiki/templates/public/stylesheets/my_wiki/back.jpg +0 -0
  93. data/my_wiki/templates/public/stylesheets/my_wiki/back1.jpg +0 -0
  94. data/my_wiki/templates/public/stylesheets/my_wiki/back2.jpg +0 -0
  95. data/my_wiki/templates/public/stylesheets/my_wiki/foot.jpg +0 -0
  96. data/my_wiki/templates/public/stylesheets/my_wiki/h1.gif +0 -0
  97. data/my_wiki/templates/public/stylesheets/my_wiki/h1.jpg +0 -0
  98. data/my_wiki/templates/public/stylesheets/my_wiki/menu.jpg +0 -0
  99. data/my_wiki/templates/public/stylesheets/my_wiki/menu2.jpg +0 -0
  100. data/my_wiki/templates/public/stylesheets/my_wiki/menu_c.jpg +0 -0
  101. data/my_wiki/templates/public/stylesheets/my_wiki/my_wiki.css +336 -0
  102. data/my_wiki/templates/public/stylesheets/my_wiki/title.jpg +0 -0
  103. metadata +181 -0
@@ -0,0 +1,4 @@
1
+ <%% if @is_first -%>
2
+ This is the first version.
3
+ <%% end -%>
4
+ <font color="gray"><pre><%%= @difference %></pre></font>
@@ -0,0 +1,34 @@
1
+ <%% unless @difference.nil? -%>
2
+ <font color="gray"><pre><%%= @difference %></pre></font>
3
+ <%% end -%>
4
+
5
+ <%% unless @preview.nil? -%>
6
+ <div class="preview">
7
+ <%%= @mytemplate.render(@preview, :view=>self) %>
8
+ </div>
9
+ <%% end -%>
10
+
11
+ <div class="edit">
12
+ <%%= start_form_tag :action => 'update', :id => @content %>
13
+ <%%= render :partial => 'form' %>
14
+
15
+ <%% unless @session[:user].nil? %>
16
+ <p><label for="content_freezed">更新を制限する</label>
17
+ <%%= check_box 'content', 'freezed', {:value => @content.freezed} %></p>
18
+ <%%= hidden_field 'content', 'updated_by', {:value => @session[:user].id} %>
19
+ <%% end %>
20
+
21
+ <%%= submit_tag 'プレビュー' %>
22
+ <%%= submit_tag '保存して編集を継続' %>
23
+ <%%= submit_tag '保存' %><!-- %= check_box_tag 'update_update_at', '1', true %>タイムスタンプを更新する -->
24
+ <%%= end_form_tag %>
25
+ </div>
26
+
27
+ <div class="attach">
28
+ <%%= start_form_tag({:action=>'attach_file'}, :multipart => true) %>
29
+ <label>添付ファイル</label><br/>
30
+ <%%= hidden_field "attached", "id", :value => @content.id %>
31
+ <%%= file_field "attached", "file" %>
32
+ <%%= submit_tag 'Upload' %>
33
+ <%%= end_form_tag %>
34
+ </div>
@@ -0,0 +1,22 @@
1
+ <p><label>Filename</label><br/>
2
+ <%%= link_to @attachment.basename,
3
+ :controller=>"<%= file_name %>",
4
+ :action=>"download",
5
+ :id=>params[:id],
6
+ :filename=>params[:filename] %></p>
7
+
8
+ <p><label>URI</label><br/>
9
+ <%%= url_for :controller=>"<%= file_name %>",
10
+ :action=>"download",
11
+ :id=>params[:id],
12
+ :filename=>params[:filename] %></p>
13
+
14
+ <p><label>Created date</label><br/>
15
+ <%%= @attachment.ctime.strftime "%Y/%m/%d %H:%M:%S" %></p>
16
+
17
+ <p><label>Size</label><br/>
18
+ <%%= @attachment.size %> bytes</p>
19
+
20
+ <%%= start_form_tag :action => 'detach_file', :id => params[:id], :filename => params[:filename] %>
21
+ <%%= submit_tag 'Delete' %>
22
+ <%%= end_form_tag %>
@@ -0,0 +1 @@
1
+ <%%= render_component :controller => 'list/list', :action => 'list' %>
@@ -0,0 +1 @@
1
+ <%%=debug ActionMailer::Base.deliveries %>
@@ -0,0 +1,6 @@
1
+ <div class="new">
2
+ <%%= start_form_tag :action => 'create' %>
3
+ <%%= render :partial => 'form' %>
4
+ <%%= submit_tag "保存" %>
5
+ <%%= end_form_tag %>
6
+ </div>
@@ -0,0 +1,3 @@
1
+ <%%= render_component :controller => 'list/list',
2
+ :action => 'list',
3
+ :params => {:order => 'updated_at DESC'} %>
@@ -0,0 +1,5 @@
1
+ <%%= start_form_tag :action => 'search_result' %>
2
+ <p>Input Conditions:<br />
3
+ <%%= text_field_tag 'words' %></p>
4
+ <%%= submit_tag 'Search' %>
5
+ <%%= end_form_tag %>
@@ -0,0 +1,10 @@
1
+ <ul>
2
+ <%% @contents.each do |content| -%>
3
+ <li title="<%%= time_ago_in_words(content.updated_at) %>">
4
+ <%%= link_to content.title, {:controller => '<%= file_name %>', :action => "show", :id => content.id} %>
5
+ <%% unless params[:exclude_day] -%>
6
+ (<%%= content.updated_at.strftime '%Y/%m/%d %H:%M:%S' %>)
7
+ <%% end %>
8
+ </li>
9
+ <%% end -%>
10
+ </ul>
@@ -0,0 +1,31 @@
1
+ <%% #保存 -%>
2
+ <%%= @mytemplate.render(@content.body, :view=>self) %>
3
+
4
+ <hr />
5
+ <div class="updated_at">
6
+ 更新日: <%%= @content.updated_at.strftime '%y/%m/%d %H:%M:%S' %>
7
+ </div>
8
+
9
+ <%% unless @max.nil? -%>
10
+ <div class="history">
11
+ <%%= link_to 'Back to time',
12
+ {:controller => 'content_history',
13
+ :action => 'show',
14
+ :title => @content.title,
15
+ :version => @max} %>
16
+ <%%= "(##{@max})" %>
17
+ </div>
18
+ <%% end -%>
19
+
20
+ <%% unless @attaches.empty? -%>
21
+ <div class="attachment">
22
+ 添付ファイル:<br />
23
+ <%% @attaches.each do |pathname| %>
24
+ <%%= link_to pathname.basename,
25
+ :controller=>"<%= file_name %>",
26
+ :action=>"fileinfo",
27
+ :id=>pathname.dirname.basename,
28
+ :filename=>pathname.basename %>
29
+ <%% end -%>
30
+ </div>
31
+ <%% end -%>
@@ -0,0 +1,5 @@
1
+ <ol>
2
+ <li><%%= link_to '各種設定', :controller => '<%= file_name %>_admin', :action => 'setting' %></li>
3
+ <li><%%= link_to 'ページ管理', :controller => 'page_admin', :action => 'list' %></li>
4
+ <li><%%= link_to 'ユーザー管理', :controller => 'user_admin', :action => 'index' %></li>
5
+ </ol>
@@ -0,0 +1,64 @@
1
+ <%%= start_form_tag :action => 'update', :id => @setting %>
2
+ <%% hidden_field 'setting', 'id' %>
3
+ <%% hidden_field 'setting', 'label' %>
4
+ <table class="table">
5
+ <tr>
6
+ <th>ラベル</th>
7
+ <td><%%= @setting.label %><!-- %= select "setting", "label", ["default"] % --></td>
8
+ </tr>
9
+ <tr>
10
+ <th>サイトタイトル</th>
11
+ <td><%%= text_field "setting", "site_title" %></td>
12
+ </tr>
13
+ <tr>
14
+ <th>フッター</th>
15
+ <td><%%= text_area "setting", "footer", :rows=>"3" %></td>
16
+ </tr>
17
+ <tr>
18
+ <th>レイアウト</th>
19
+ <td><%%= text_field "setting", "layout" %></td>
20
+ </tr>
21
+ <tr>
22
+ <th>CSS</th>
23
+ <td><%%= text_field "setting", "css" %></td>
24
+ </tr>
25
+ <tr>
26
+ <th>サイドバーを使用する</th>
27
+ <td><%%= select "setting", "use_sidebar",
28
+ [["はい", true],
29
+ ["いいえ", false]] %></td>
30
+ </tr>
31
+ <tr>
32
+ <th>サイドバーにするページ名</th>
33
+ <td><%%= text_field "setting", "sidebar_page" %></td>
34
+ </tr>
35
+ <tr>
36
+ <th>変更をメールで通知する</th>
37
+ <td><%%= select "setting", "email_changed",
38
+ [["通知しない", "0"],
39
+ ["登録ユーザー全てに通知", "1"],
40
+ ["スーパーユーザーと管理者に通知", "2"],
41
+ ["管理者に通知", "3"]] %></td>
42
+ </tr>
43
+ <tr>
44
+ <th>リンクは別ウィンドウで開く</th>
45
+ <td><%%= select "setting", "target_blank",
46
+ [["はい", true],
47
+ ["いいえ", false]] %></td>
48
+ </tr>
49
+ <tr>
50
+ <th>WikiNameを使用する</th>
51
+ <td><%%= select "setting", "use_wikiname",
52
+ [["はい", true],
53
+ ["いいえ", false]] %></td>
54
+ </tr>
55
+ <tr>
56
+ <th>本設定を有効にする</th>
57
+ <td><%%= check_box "setting", "active" %></td>
58
+ </tr>
59
+ <tr>
60
+ <th colspan="2"><%%= submit_tag '変更' %></th>
61
+ </tr>
62
+ </table>
63
+
64
+ <%%= end_form_tag %>
@@ -0,0 +1,3 @@
1
+ ページが<%%= @action %>されました。
2
+ 以下のリンクを参照してください:
3
+ http://techno.hippy.jp/rails/<%= file_name %>/show/<%%= @title %>
@@ -0,0 +1,22 @@
1
+ <%%= error_messages_for 'content' %>
2
+
3
+ <!--[form:content]-->
4
+ <p><label for="content_version">Version</label><br/>
5
+ <%%= text_field 'content', 'version' %></p>
6
+
7
+ <p><label for="content_updated_at">Updated at</label><br/>
8
+ <%%= datetime_select 'content', 'updated_at' %></p>
9
+
10
+ <p><label for="content_title">Title</label><br/>
11
+ <%%= text_field 'content', 'title' %></p>
12
+
13
+ <p><label for="content_body">Body</label><br/>
14
+ <%%= text_area 'content', 'body' %></p>
15
+
16
+ <p><label for="content_updated_by">Updated by</label><br/>
17
+ <%%= text_field 'content', 'updated_by' %></p>
18
+
19
+ <p><label for="content_freezed">Freezed</label><br/>
20
+ <select id="content_freezed" name="content[freezed]"><option value="false" selected>False</option><option value="true">True</option></select></p>
21
+ <!--[eoform:content]-->
22
+
@@ -0,0 +1,9 @@
1
+ <h1>Editing content</h1>
2
+
3
+ <%%= start_form_tag :action => 'update', :id => @content %>
4
+ <%%= render :partial => 'form' %>
5
+ <%%= submit_tag 'Edit' %>
6
+ <%%= end_form_tag %>
7
+
8
+ <%%= link_to 'Show', :action => 'show', :id => @content %> |
9
+ <%%= link_to 'Back', :action => 'list' %>
@@ -0,0 +1,55 @@
1
+ <h1>Listing contents</h1>
2
+
3
+ <table class="table">
4
+ <tr>
5
+ <th></th>
6
+ <th>タイトル</th>
7
+ <!-- th>本文</th -->
8
+ <th>Ver.</th>
9
+ <th>更新日付</th>
10
+ <th>更新者</th>
11
+ <th>凍結</th>
12
+ <th>添付</th>
13
+ <th colspan="3">処理</th>
14
+ </tr>
15
+
16
+ <%% for content in @contents %>
17
+ <tr>
18
+ <td><%%= check_box_tag "chk" %></td>
19
+ <td><%%= link_to content.title, :controller=>'<%= file_name %>', :action=>'show', :title=>content.title %></td>
20
+ <!-- td><%%=h truncate(content.body, 40) %></td -->
21
+ <td><%%= if content.version == FIRST_VERSION
22
+ content.version
23
+ else
24
+ "<select onChange=\"javascript:retrospectTo(this);\">#{
25
+ options = (FIRST_VERSION..content.version).to_a.reverse.collect do |e|
26
+ [e.to_s, "#{url_for :controller=>'<%= file_name %>_history', :action=>'show', :title=>content.title}/#{e}"]
27
+ end
28
+ options_for_select(options)
29
+ }</select>"
30
+ end
31
+ %></td>
32
+ <td><%%= content.updated_at.strftime("%Y/%m/%d<br />%H:%M:%S") %></td>
33
+ <td><%%=h (content.user.nil? ? "-" : content.user.login) %></td>
34
+ <td><%%= content.freezed ? "x" : "-" %></td>
35
+ <td><%%= content.attachments.empty? ? "-" : "<ul><li>" +
36
+ content.attachments.collect{|attachment|
37
+ link_to attachment.basename,
38
+ :controller=>"<%= file_name %>",
39
+ :action=>"fileinfo",
40
+ :id=>content.id,
41
+ :filename=>attachment.basename
42
+ }.join("</li><li>") + "</li></ul>" %></td>
43
+ <td><%%= link_to 'S', :action => 'show', :id => content %></td>
44
+ <td><%%= link_to 'E', :action => 'edit', :id => content %></td>
45
+ <td><%%= link_to 'D', { :action => 'destroy', :id => content }, :confirm => 'Are you sure?' %></td>
46
+ </tr>
47
+ <%% end %>
48
+ </table>
49
+
50
+ <%%= link_to 'Previous page', { :page => @content_pages.current.previous } if @content_pages.current.previous %>
51
+ <%%= link_to 'Next page', { :page => @content_pages.current.next } if @content_pages.current.next %>
52
+
53
+ <br />
54
+
55
+ <%%= link_to 'New content', :action => 'new' %>
@@ -0,0 +1,8 @@
1
+ <h1>New content</h1>
2
+
3
+ <%%= start_form_tag :action => 'create' %>
4
+ <%%= render :partial => 'form' %>
5
+ <%%= submit_tag "Create" %>
6
+ <%%= end_form_tag %>
7
+
8
+ <%%= link_to 'Back', :action => 'list' %>
@@ -0,0 +1,8 @@
1
+ <%% for column in Content.content_columns %>
2
+ <p>
3
+ <b><%%= column.human_name %>:</b> <%%=h @content.send(column.name) %>
4
+ </p>
5
+ <%% end %>
6
+
7
+ <%%= link_to 'Edit', :action => 'edit', :id => @content %> |
8
+ <%%= link_to 'Back', :action => 'list' %>
@@ -0,0 +1,10 @@
1
+ <%%= error_messages_for 'user' %>
2
+
3
+ <!--[form:user]-->
4
+ <p><label for="user_login">Login</label><br/>
5
+ <%%= text_field 'user', 'login' %></p>
6
+
7
+ <p><label for="user_password">Password</label><br/>
8
+ <%%= password_field 'user', 'password' %></p>
9
+ <!--[eoform:user]-->
10
+
@@ -0,0 +1,9 @@
1
+ <h1>Editing user</h1>
2
+
3
+ <%%= start_form_tag :action => 'update', :id => @user %>
4
+ <%%= render :partial => 'form' %>
5
+ <%%= submit_tag 'Edit' %>
6
+ <%%= end_form_tag %>
7
+
8
+ <%%= link_to 'Show', :action => 'show', :id => @user %> |
9
+ <%%= link_to 'Back', :action => 'list' %>
@@ -0,0 +1,25 @@
1
+ <h1>Listing users</h1>
2
+
3
+ <table class="table">
4
+ <tr>
5
+ <th>User Name</th>
6
+ <th>Role</th>
7
+ <th colspan="2">Actions</th>
8
+ </tr>
9
+
10
+ <%% for user in @users %>
11
+ <tr>
12
+ <td><%%=h user.login %></td>
13
+ <td><%%=h user.role.name %></td>
14
+ <td><%%= link_to 'Edit', :controller => 'login', :action => 'edit', :id => user %></td>
15
+ <td><%%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?' %></td>
16
+ </tr>
17
+ <%% end %>
18
+ </table>
19
+
20
+ <%%= link_to 'Previous page', { :page => @user_pages.current.previous } if @user_pages.current.previous %>
21
+ <%%= link_to 'Next page', { :page => @user_pages.current.next } if @user_pages.current.next %>
22
+
23
+ <br />
24
+
25
+ <%%= link_to 'New user', :controller => 'login', :action => 'signup' %>
@@ -0,0 +1,20 @@
1
+ <%%= start_form_tag :action=> "signup" %>
2
+
3
+ <div title="Account signup" id="signupform" class="form">
4
+ <h3>Signup</h3>
5
+ <%%= error_messages_for 'user' %><br/>
6
+
7
+ <label for="user_login">Desired login:</label><br/>
8
+ <%%= text_field "user", "login", :size => 30 %><br/>
9
+ <label for="user_password">Choose password:</label><br/>
10
+ <%%= password_field "user", "password", :size => 30 %><br/>
11
+ <label for="user_password_confirmation">Confirm password:</label><br/>
12
+ <%%= password_field "user", "password_confirmation", :size => 30 %><br/>
13
+
14
+ <label for="user_role">Role:</label><br/>
15
+ <%%= collection_select :user, :role_id, @roles, :id, :name %><br />
16
+
17
+ <input type="submit" value="Signup &#187;" class="primary" />
18
+
19
+ <%%= end_form_tag %>
20
+
@@ -0,0 +1,5 @@
1
+ <ol>
2
+ <li><%%= link_to '各種設定', :controller => '<%= file_name %>_admin', :action => 'setting' %></li>
3
+ <li><%%= link_to 'ページ管理', :controller => 'page_admin', :action => 'list' %></li>
4
+ <li><%%= link_to 'ユーザー管理', :controller => 'user_admin', :action => 'index' %></li>
5
+ </ol>
@@ -0,0 +1,3 @@
1
+ class Admin::MenuController < ActionController::Base
2
+ uses_component_template_root
3
+ end
@@ -0,0 +1,11 @@
1
+ <%% "�R���g���[���[��<%= file_name %>��ݒ肵�Ă��܂����̂őS�R���L�ł��Ȃ�" %>
2
+ <ul>
3
+ <%% @contents.each do |content| -%>
4
+ <li title="<%%= time_ago_in_words(content.updated_at) %>">
5
+ <%%= link_to content.title, {:controller => '<%= file_name %>', :action => "show", :id => content.id} %>
6
+ <%% unless params[:exclude_day] -%>
7
+ (<%%= content.updated_at.strftime '%Y/%m/%d %H:%M:%S' %>)
8
+ <%% end %>
9
+ </li>
10
+ <%% end -%>
11
+ </ul>
@@ -0,0 +1,11 @@
1
+ class List::ListController < ActionController::Base
2
+ uses_component_template_root
3
+
4
+ def list
5
+ options = {:order => 'id'}
6
+ options[:order] = params[:order] unless params[:order].nil?
7
+ options[:limit] = params[:limit].to_i unless params[:limit].nil?
8
+ @contents = Content.find :all, options
9
+ render :layout => false
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ <%% unless @content.nil? -%>
2
+ <%%= @mytemplate.render(@content.body, :view=>self) %>
3
+ <%% else -%>
4
+ <%%= render_component :controller => "list/list",
5
+ :action => "list",
6
+ :params => {:exclude_day => true, :order => 'updated_at DESC'} %>
7
+ <%% end -%>