vieweditattachhistoryswikistopchangessearchhelp

更新履歴ページ

<?doctype?>
<html>
<head>
<title><?name?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>更新履歴</h2>
<table border=0 cellpadding=3 cellspacing=0>
<tr>
<td><b>変更</b>&nbsp;&nbsp;</td>
<td><b>ソース</b>&nbsp;&nbsp;</td>
<td><b>タイトル</b>&nbsp;&nbsp;</td>
<td><b>更新者</b>&nbsp;&nbsp;</td>
<td><b>更新日時</b>&nbsp;&nbsp;</td>
<td>&nbsp;&nbsp;</td>
</tr>
<?versions?></table>
<?toHist?>
<?endBody?></body>
</html>


refs → actions (page) → versions "更新履歴本体アクション"

| versions return size |
versions _ (page versions addLast: page; yourself) reverse.
size _ versions size.
return _ WriteStream on: String new.
1 to: (10 min: size) do: [ :idx |
  | ver prev |
  prev _ idx < size ifTrue: [versions at: idx + 1] ifFalse: [nil].
  return nextPutAll: '<tr>', String crlf.
  return nextPutAll: '<td>', (prev
      ifNil: ['&nbsp;&nbsp;']
      ifNotNil: [book
        formatPageAction: 'diffHistory'
        request: request
        response: response
        shelf: shelf
        page: prev]), '</td>', String crlf.
  return nextPutAll: ((ver _ versions at: idx) == page
      ifTrue: ['<td><a href="',
        (request referenceShelf: shelf book: book page: page address: 'edit'),
          '">現在</a>&nbsp;&nbsp;']
      ifFalse: ['<td>',
        (book
          formatPageAction: 'versionHistory'
          request: request
          response: response
          shelf: shelf
          page: ver)]), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'name'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'user'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'date'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'time'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf, '</tr>', String crlf].
return contents



refs → actions (page) → diffHistory "差分表示ボタン"

'<form action="', (request referenceShelf: shelf book: book page: page address: 'diff'), '"><input type="hidden" name="id" value="', (page versionId asString), '"><input type="submit" value="', (page versionId asString), '→"></form>'


refs → addresses (page) → hist "完全な更新履歴呼び出し用アドレス作成"

book formatPageTemplate: 'hist' request: request response: response shelf: shelf page: page


refs → tempaltes (page) → hist "完全な更新履歴ページテンプレート作成"

<?doctype?>
<html>
<head>
<title><?name?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>更新履歴</h2>
<table border=0 cellpadding=3 cellspacing=0>
<tr>
<td><b>+/−</b>&nbsp;&nbsp;</td>
<td><b>ソース</b>&nbsp;&nbsp;</td>
<td><b>タイトル</b>&nbsp;&nbsp;</td>
<td><b>更新者</b>&nbsp;&nbsp;</td>
<td><b>更新日時</b>&nbsp;&nbsp;</td>
<td>&nbsp;&nbsp;</td>
</tr>
<?vers?></table>
<?endBody?></body>
</html>



refs → actions (page) → toHist "完全な更新履歴呼び出し用アクション作成"

page versions size > 9 ifTrue: [
'<h3><a href="', (
  request referenceShelf: shelf book: book page: page address: 'hist'),
    '">完全な更新履歴</a></h3>'] ifFalse: ['']



refs → actions (page) → vers "完全な履歴本体アクション"

| versions return size |
versions _ (page versions addLast: page; yourself) reverse.
size _ versions size.
return _ WriteStream on: String new.
1 to: size do: [ :idx |
  | ver prev |
  prev _ idx < size ifTrue: [versions at: idx + 1] ifFalse: [nil].
  return nextPutAll: '<tr>', String crlf.
  return nextPutAll: '<td>', (prev
      ifNil: ['&nbsp;&nbsp;']
      ifNotNil: [book
        formatPageAction: 'diffHistory'
        request: request
        response: response
        shelf: shelf
        page: prev]), '</td>', String crlf.
  return nextPutAll: ((ver _ versions at: idx) == page
      ifTrue: ['<td><a href="',
        (request referenceShelf: shelf book: book page: page address: 'edit'),
          '">現在</a>&nbsp;&nbsp;']
      ifFalse: ['<td>',
        (book
          formatPageAction: 'versionHistory'
          request: request
          response: response
          shelf: shelf
          page: ver)]), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'name'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'user'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'date'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf.
  return nextPutAll: '<td>',
    (book
      formatPageAction: 'time'
      request: request
      response: response
      shelf: shelf
      page: ver), '</td>', String crlf, '</tr>', String crlf].
return contents



refs → templates (page) → diff "差分表示本体テンプレート"

<?doctype?>
<html>
<head>
<title><?name?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2><?showDiffTitle?></h2>
<font color=gray>削除は <s>取消線</s> 、追加は <b>太字</b> で示されます。段落の一部が修正されたときは、その段落全体をいったん削除して、新しい内容の段落を追加したように表現されます。</font>
<table border=0 cellspacing=0 cellpadding=3>
<tr><?diffPrevious?><?diffPreviousVersion?><?diffNextVersion?><?diffNext?></tr>
</table>
<hr>
<?diff?>
<?endBody?></body>
</html>



refs → actions (page) → showDiffTitle "差分画面のタイトル表示用アクション"

'第 ', (request settingsAt: 'oldVersion') versionId asString, ' 版に加えられた変更'


refs → actions (page) → diffPrevious "ひとつ前の差分画面を呼び出すボタン体裁"

| oldVersion |
oldVersion _ request settingsAt: 'oldVersion'.
(oldVersion versionId = 1)
  ifTrue: ['']
  ifFalse: ['<td><form action="', (request referenceShelf: shelf book: book page: page address: 'diff'), '"><input type="hidden" name="id" value="', (oldVersion versionId - 1) asString, '"><input type="submit" value="第 ', (oldVersion versionId - 1) asString, ' 版に加えられた変更"></form></td>']



refs → actions (page) → diffNext "ひとつ後の差分画面を呼び出すボタン体裁"

| newVersion |
newVersion _ request settingsAt: 'newVersion'.
(newVersion versionId = 0)
  ifTrue: ['']
  ifFalse: ['<td><form action="', (request referenceShelf: shelf book: book page: page address: 'diff'), '"><input type="hidden" name="id" value="', (newVersion versionId asString), '"><input type="submit" value="第 ', newVersion versionId asString, ' 版に加えられた変更"></form></td>']



refs → actions (page) → diffNextVersion "変更後のバージョンのソース表示画面を呼び出すボタン体裁"

| versionIdString |
versionIdString _ (request settingsAt: 'newVersion') versionId asString.
(versionIdString = '0')
  ifTrue: ["Send to View this Page"
    '<td><form action="', (request referenceShelf: shelf book: book page: page), '"><input type="submit" value="現在のページを表示"></form></td>']
  ifFalse: ['<td><form action="', (request referenceShelf: shelf book: book page: page address: 'version'), '"><input type="hidden" name="id" value="', versionIdString, '"><input type="submit" value="第 ', versionIdString, ' 版のソース"></form></td>']



refs → actions (page) → diffPreviousVersion "変更前のバージョンのソース表示画面を呼び出すボタン体裁"

| versionIdString |
versionIdString _ (request settingsAt: 'oldVersion') versionId asString.
'<td><form action="', (request referenceShelf: shelf book: book page: page address: 'version'), '"><input type="hidden" name="id" value="', versionIdString, '"><input type="submit" value="第 ', versionIdString, ' 版のソース"></form></td>'



refs → templates (page) → version "履歴のソース表示画面のテンプレート"

<?doctype?>
<html>
<head>
<title><?name?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>第 <?versionNumber?> 版のソース</h2>
<table border=0 cellspacing=0 cellpadding=3>
<tr><?versionPrevious?><?versionDiff?><?versionNext?></tr>
</table>
<?versionBody?>
<?endBody?></body>
</html>



refs → templates (page) → versionBody "履歴の本体の体裁用テンプレート"

<form>
<h3>ソース</h3>
<?editTextArea?>
<br>
<h3>ページの更新を知らせる e-mail アドレス</h3>
<textarea rows=3 cols=100 wrap=virtual><?alerts?></textarea>
</form>
<hr>
<h3>実際の表示</h3>
<?showTextArea?>



refs → actions (page) → versionPrevious "前のバージョンのソース"

| version |
version _ request settingsAt: 'version'.
(version versionId = 1)
  ifTrue: ['']
  ifFalse: ['<td><form action="', (request referenceShelf: shelf book: book page: page address: 'version'), '"><input type="hidden" name="id" value="', (version versionId - 1) asString, '"><input type="submit" value="第 ', (version versionId - 1) asString, ' 版のソース"></form></td>']



refs → actions (page) → versionNext "次のバージョンのソース"

| nextVersion |
nextVersion _ request settingsAt: 'nextVersion'.
(nextVersion versionId = 0)
  ifTrue: ['']
  ifFalse: ['<td><form action="', (request referenceShelf: shelf book: book page: page address: 'version'), '"><input type="hidden" name="id" value="', (nextVersion versionId asString), '"><input type="submit" value="第 ', nextVersion versionId asString,' 版のソース"></form></td>']



refs → actions (page) → versionDiff "表示中のバージョンに加えられた変更画面を呼び出す"

| version |
version _ request settingsAt: 'version'.
'<td><form action="', (request referenceShelf: shelf book: book page: page address: 'diff'), '"><input type="hidden" name="id" value="', version versionId asString, '"><input type="submit" value="第 ', version versionId asString, ' 版に加えられた変更"></form></td>'



このページを編集 (15103 bytes)


Congratulations! 以下の 1 ページから参照されています。

This page has been visited 2611 times.