OSDN Git Service

追加ルール用ドキュメントの追加
authortkt <tkt@users.sourceforge.jp>
Mon, 21 Mar 2011 07:30:10 +0000 (16:30 +0900)
committertkt <tkt@users.sourceforge.jp>
Mon, 21 Mar 2011 07:30:10 +0000 (16:30 +0900)
カスタムルールなどを別記載する用のページ表示を追加

trunk/lib/ms/ms.rb
trunk/lib/ms/page.rb
trunk/skel/documentcustom.rhtml [new file with mode: 0644]

index aa9b436..99970cf 100644 (file)
@@ -293,6 +293,12 @@ class CWolf
        def handle_doc
                print Page::Document.new(@login.form).result()
        end
+       
+       #tkt@add:2011/03/20 for custom rule page start
+       def handle_docc
+               print Page::DocumentCustom.new(@login.form).result()
+       end
+       #tkt@add:2011/03/20 for custom rule page end
 
        def handle_log
                #mod@tkt 2009/12/29: print Page::LogIndex.new(@login.form).result()
@@ -501,7 +507,11 @@ class CWolf
                        end
 
                        cmd = @req['cmd']
-                       if %w(mkvil log doc history info chars reg).index(cmd)
+                       
+                       #tkt@mod:2011/03/20 for custom rule page start
+                       if %w(mkvil log doc docc history info chars reg).index(cmd)
+                       #tkt@mod:2011/03/20 for custom rule page end
+       
                                __send__('handle_' + cmd)
                        elsif (@vid != 0)
                                handle_vid()
index f9bfeba..23ffcfc 100644 (file)
@@ -222,6 +222,17 @@ module Page
                end
        end
 
+       #tkt@add:2011/03/20 for custom rule page start
+       class DocumentCustom < Base
+               def initialize(login)
+                       super()
+
+                       @login = login
+                       @title = '追加ルール'
+               end
+       end
+       #tkt@add:2011/03/20 for custom rule page end
+       
        class Regulation < Base
                def initialize(login)
                        require 'cache'
diff --git a/trunk/skel/documentcustom.rhtml b/trunk/skel/documentcustom.rhtml
new file mode 100644 (file)
index 0000000..d664caa
--- /dev/null
@@ -0,0 +1,32 @@
+<h2 class="ss"><%= GAME_TITLE %></h2>
+
+<p>
+<ul>
+<li><a href="#about">このサイトについて</a></li>
+<li><a href="#diff">人狼達の黄昏::夜明しとの違い</a></li>
+<li><a href="#qa">Q&A</a></li>
+</ul>
+</p>
+
+<h2 class="ss"><a name="about">このサイトについて</a></h2>
+
+<p>カスタムルールなど、クローン特有のドキュメントを記載するページです。</p>
+<p>人狼達の黄昏::夜明しとの違い、追加ルールなどを記載するために作成しました。</p>
+<p>このrhtmlに記載されている内容はサンプルです。</p>
+
+<h2 class="ss"><a name="diff">人狼達の黄昏::夜明しとの違い</a></h2>
+
+<p>追加ルールなどを記載します。</p>
+
+
+<h2 class="ss"><a name="qa">Q&A</a></h2>
+
+<dl>
+
+<dt>
+Q. 禁止事項などは?
+<dd>
+(<a href="?cmd=doc">しおり</a>-<a href="?cmd=doc#rule">ルール</a>から抜粋)
+<blockquote>このゲームは参加者の紳士協定によって成り立っているゲームです。<strong>他のプレイヤーを楽しませ、あなたも楽しんで下さい!!</strong></blockquote>
+</dl>
+