12
period = "#{info.year}ǯ"
13
period = "#{info.year}年"
14
period = (info.month.to_i == 1 ? "��Ⱦ��" : "��Ⱦ��")
15
period = "#{info.year}ǯ #{period}" if info.year
15
period = (info.month.to_i == 1 ? "上半期" : "下半期")
16
period = "#{info.year}年 #{period}" if info.year
17
period = "��#{info.month.to_i}��Ⱦ��"
18
period = "#{info.year}ǯ #{period}" if info.year
18
period = "第#{info.month.to_i}四半期"
19
period = "#{info.year}年 #{period}" if info.year
20
period = "#{info.month.to_i}��"
21
period = "#{info.year}ǯ #{period}" if info.year
21
period = "#{info.month.to_i}月"
22
period = "#{info.year}年 #{period}" if info.year
23
24
period = " (#{period})" if period
34
35
@conf['category.next_quarter'] ||= '($1-$2) >>'
35
36
@conf['category.prev_month'] ||= '<< ($1-$2)'
36
37
@conf['category.next_month'] ||= '($1-$2) >>'
37
@conf['category.this_year'] ||= 'ǯ'
38
@conf['category.this_half'] ||= 'Ⱦ��'
39
@conf['category.this_quarter'] ||= '��Ⱦ��'
40
@conf['category.this_month'] ||= '��'
41
@conf['category.all_diary'] ||= '������'
42
@conf['category.all_category'] ||= '�����ƥ���'
43
@conf['category.all'] ||= '������/�����ƥ���'
38
@conf['category.this_year'] ||= '年'
39
@conf['category.this_half'] ||= '半期'
40
@conf['category.this_quarter'] ||= '四半期'
41
@conf['category.this_month'] ||= '月'
42
@conf['category.all_diary'] ||= '全期間'
43
@conf['category.all_category'] ||= '全カテゴリ'
44
@conf['category.all'] ||= '全期間/全カテゴリ'
45
46
category_init_local
47
@category_conf_label = '���ƥ���'
48
@category_conf_label = 'カテゴリ'
48
49
def category_conf_html
50
<h3 class="subtitle">���ƥ��ꥤ��ǥå����κ���</h3>
51
<h3 class="subtitle">カテゴリインデックスの作成</h3>
52
���ƥ���ε�ǽ�����Ѥ���ˤϥ��ƥ��ꥤ��ǥå����餫����������Ƥ���ɬ�פ�����ޤ���
53
���ƥ��ꥤ��ǥå������������ˤ�
54
�ʲ��Υ����å�������Ƥ���OK�ܥ�����Ƥ���������
53
カテゴリの機能を利用するにはカテゴリインデックスをあらかじめ作成しておく必要があります。
55
以下のチェックを入れてからOKボタンを押してください。
56
57
<p><label for="category_initialize">
57
<input type="checkbox" id="category_initialize" name="category_initialize" value="1">���ƥ��ꥤ��ǥå����κ���
58
<input type="checkbox" id="category_initialize" name="category_initialize" value="1">カテゴリインデックスの作成
60
�������̤䥵���Ф���ǽ�ˤ���ޤ��������ä�������äǥ���ǥå����κ����Ͻ�λ���ޤ���
61
日記の量やサーバの性能にもよりますが、数秒から数十秒でインデックスの作成は終了します。
63
<h3 class="subtitle">�����Խ����ݡ���</h3>
64
<h3 class="subtitle">日記編集サポート</h3>
65
�����Խ����̤Ρ���ʸ�פβ��˥��ƥ���̾�����ɽ�����뤳�Ȥ��Ǥ��ޤ���
66
���ƥ���̾��å�����ȡ���ʸ�פˤ��Υ��ƥ���̾����������ޤ�(��JavaScript)��
66
日記編集画面の「本文」の下にカテゴリ名を一覧表示することができます。
67
カテゴリ名をクリックすると「本文」にそのカテゴリ名が挿入されます(要JavaScript)。
69
70
<select name="category.edit_support">
70
<option value="true"#{" selected" if @conf['category.edit_support']}>ɽ������</option>
71
<option value="false"#{" selected" unless @conf['category.edit_support']}>ɽ�����ʤ�</option>
71
<option value="true"#{" selected" if @conf['category.edit_support']}>表示する</option>
72
<option value="false"#{" selected" unless @conf['category.edit_support']}>表示しない</option>
75
<h3 class="subtitle">ɽ�����֤ν������</h3>
76
<h3 class="subtitle">表示期間の初期状態</h3>
77
���ƥ���ɽ�����̤�ɽ���������Ρ��ǽ��ɽ�����֤���ꤷ�ޤ���
78
カテゴリ表示画面を表示した時の、最初の表示期間を指定します。
80
81
<select name="category.period">
83
['��', 'month', false],
84
['��Ⱦ��', 'quarter', true],
85
['Ⱦ��', 'half', false],
87
['������', 'all', false],
84
['月', 'month', false],
85
['四半期', 'quarter', true],
86
['半期', 'half', false],
88
['全日記', 'all', false],
88
89
].each do |text, value, default|
89
90
selected = @conf["category.period"] ? @conf["category.period"] == value : default
98
<h3 class="subtitle">�إå�</h3>
99
<h3 class="subtitle">ヘッダ</h3>
100
���̾�����ɽ������ʸ�Ϥ���ꤷ�ޤ���
101
��<%= category_navi %>�פǡ����ƥ�����ò������ʥӥ��������ܥ����ɽ�����뤳�Ȥ��Ǥ��ޤ���
102
�ޤ���<%= category_list%>�פǥ��ƥ���̾������ɽ�����뤳�Ȥ��Ǥ��ޤ���
103
����¾���Ƽ�ץ饰�����HTML�ҤǤ��ޤ���
102
「<%= category_navi %>」で、カテゴリに特化したナビゲーションボタンを表示することができます。
103
また「<%= category_list%>」でカテゴリ名一覧を表示することができます。
104
その他,各種プラグインやHTMLを記述できます。
107
<p>�ʥӥ��������ܥ���Τ�������ɽ������ޤ���</p>
108
<p>ナビゲーションボタンのすぐ下に表示されます。</p>
108
109
<p><textarea name="category.header1" cols="60" rows="5">#{h @conf['category.header1']}</textarea></p>
111
<p>H1�Τ�������ɽ������ޤ���</p>
112
<p>H1のすぐ下に表示されます。</p>
112
113
<p><textarea name="category.header2" cols="60" rows="5">#{h @conf['category.header2']}</textarea></p>
114
<h3 class="subtitle">�ܥ����٥�</h3>
115
<h3 class="subtitle">ボタンラベル</h3>
116
�ʥӥ��������ܥ���Υ�٥����ꤷ�ޤ���
117
��٥����$1��$2�ϡ����줾���ǯ�סַ�פ�ɽ�����ͤ��ִ�����ޤ���
117
ナビゲーションボタンのラベルを指定します。
118
ラベル中の$1と$2は,それぞれ「年」「月」を表す数値で置換されます。
119
120
<table border="0">
120
<tr><th>�ܥ���̾</th><th>��٥�</th><th>����ץ�</th></tr>
121
<tr><th>ボタン名</th><th>ラベル</th><th>サンプル</th></tr>
123
['��ǯ', 'category.prev_year'],
124
['��ǯ', 'category.next_year'],
125
['����Ⱦǯ', 'category.prev_half'],
126
['����Ⱦǯ', 'category.next_half'],
127
['����Ⱦ��', 'category.prev_quarter'],
128
['����Ⱦ��', 'category.next_quarter'],
129
['���', 'category.prev_month'],
130
['���', 'category.next_month'],
131
['��ǯ', 'category.this_year'],
132
['��Ⱦ��', 'category.this_half'],
133
['����Ⱦ��', 'category.this_quarter'],
134
['����', 'category.this_month'],
135
['������', 'category.all_diary'],
136
['�����ƥ���', 'category.all_category'],
137
['������/�����ƥ���', 'category.all'],
124
['前年', 'category.prev_year'],
125
['翌年', 'category.next_year'],
126
['前の半年', 'category.prev_half'],
127
['次の半年', 'category.next_half'],
128
['前四半期', 'category.prev_quarter'],
129
['次四半期', 'category.next_quarter'],
130
['先月', 'category.prev_month'],
131
['翌月', 'category.next_month'],
132
['今年', 'category.this_year'],
133
['現半期', 'category.this_half'],
134
['現四半期', 'category.this_quarter'],
135
['今月', 'category.this_month'],
136
['全日記', 'category.all_diary'],
137
['全カテゴリ', 'category.all_category'],
138
['全日記/全カテゴリ', 'category.all'],
138
139
].each do |button, name|
141
142
<td>#{button}</td>
142
143
<td><input type="text" name="#{name}" value="#{h @conf[name]}" size="30"></td>
143
<td><p><span class="adminmenu"><a>#{@conf[name].sub(/\$1/, "2007").sub(/\$2/, "2")}</a></span></p></td>
144
<td><p><span class="adminmenu"><a>#{h @conf[name].sub(/\$1/, "2007").sub(/\$2/, "2")}</a></span></p></td>