vieweditattachhistoryswikistopchangessearchhelp

更新状況



refs → templates (book) → recent "最近の更新状況"

<?doctype?>
<html>
<head>
<title><?bookName?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>最近の更新状況</h2>
<?recent?>
<?endBody?></body>
</html>



refs → templates (page) → recentListing "最近の更新状況のページ表示体裁"

<li><a href="<?toDefault?>"><?name?></a> <font color=gray size=-1><?accessCount?> <font color=black>最終更新: <?time?> &lt;<?user?>&gt;</font></font>



refs → actions (book) → recent "最近の更新状況の本体"

| testDate sortedPages item test selectedPages date return |
testDate _ Date today subtractDays: 8.
sortedPages _ (book pages asSortedCollection: [:x :y | (x date = y date) ifTrue: [x time > y time] ifFalse: [x date > y date]]) asOrderedCollection.
item _ 1.
[(test _ sortedPages at: item ifAbsent: [nil])
  ifNil: [false]
  ifNotNil: [test date > testDate]] whileTrue: [item _ item + 1].
item _ item - 1.
(item < 5)
  ifTrue: [(sortedPages size < 5)
    ifTrue: [selectedPages _ sortedPages]
    ifFalse: [selectedPages _ sortedPages copyFrom: 1 to: 5]]
  ifFalse: [(item < 30)
    ifTrue: [selectedPages _ sortedPages copyFrom: 1 to: item]
    ifFalse: [selectedPages _ sortedPages copyFrom: 1 to: 30]].
date _ nil.
return _ WriteStream on: String new.
selectedPages do: [:page |
  (date notNil and: [page date = date]) ifFalse: [
    date ifNotNil: ["End Previous"
      return nextPutAll: '</ul>', String crlf].
    date _ page date.
    return nextPutAll: '<h3>', page printDate, '</h3>', String crlf, '<ul>', String crlf].
  return nextPutAll: (book formatPageTemplate: 'recentListing' request: request response: response shelf: shelf page: page)].
return nextPutAll: '</ul>'.
"Add link to complete recent changes page if necessary"
((selectedPages size) = (sortedPages size)) ifFalse: [return nextPutAll: String crlf, '<h3>', (book formatBookTemplate: 'toCompleteChanges' request: request response: response shelf: shelf), '</h3>'].
"Add link to access ranking page"
return nextPutAll: String crlf, '<h3>', (book formatBookTemplate: 'toAccesses' request: request response: response shelf: shelf), '</h3>'.
return contents



refs → templates (book) → toCompleteChanges "全ページの更新状況移動用テンプレート"

<a href="<?toCompleteChanges?>">全ページの更新状況</a>


refs → template (book) → completeChanges "全ページの更新状況テンプレート"

<?doctype?>
<html>
<head>
<title><?bookName?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>全ページの更新状況</h2>
<?completeChanges?>
<?endBody?></body>
</html>



refs → actions (book) → completeChanges "全ページの更新状況アクション"

| sortedPages date return |
sortedPages _ (book pages asSortedCollection: [:x :y | (x date = y date) ifTrue: [x time > y time] ifFalse: [x date > y date]]) asOrderedCollection.
date _ nil.
return _ WriteStream on: String new.
sortedPages do: [:page |
  (date notNil and: [page date = date]) ifFalse: [
    date ifNotNil: ["End Previous"
      return nextPutAll: '</ul>', String crlf].
    date _ page date.
    return nextPutAll: '<h3>', page printDate, '</h3>', String crlf, '<ul>', String crlf].
  return nextPutAll: (book formatPageTemplate: 'recentListing' request: request response: response shelf: shelf page: page)].
return nextPutAll: '</ul>', String crlf.
"Add link to access ranking page"
return nextPutAll: String crlf, '<h3>', (book formatBookTemplate: 'toAccesses' request: request response: response shelf: shelf), '</h3>'.
return contents



refs → templates (book) → toAccesses "移動用リンクのテンプレート作成"

<a href="<?toAccesses?>">アクセス状況</a>


refs → actions (book) → toAccesses "移動用アクション作成"

request referenceShelf: shelf book: book address: 'accesses'


refs → addresses (book) → accesses "アドレス作成"

book formatBookTemplate: 'accesses' request: request response: response shelf: shelf


refs → templates (book) → accesses "テンプレート作成"

<?doctype?>
<html>
<head>
<title><?bookName?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>アクセス状況</h2>
<?accesses?>
<?endBody?></body>
</html>



refs → actions (book) → accesses "アクション作成"

| sortedPages return pagenAccesses |
pagenAccesses _ book pages collect: [ :page |
  {page. ExAccessCounter default atBook: book page: page}].
sortedPages _ (pagenAccesses asSortedCollection: [:x :y | x last > y last])
  collect: [ :pagenAccess | pagenAccess first].
return _ WriteStream on: String new.
return nextPutAll: '<ul>', String crlf.
1 to: (10 min: sortedPages size) do: [ :idx |
  return nextPutAll: (book formatPageTemplate: 'accessListing' request: request response: response shelf: shelf page: (sortedPages at: idx))].
return nextPutAll: '</ul>', String crlf.
"Add link to complete access ranking page"
sortedPages size > 10 ifTrue: [return nextPutAll: String crlf, '<h3>', (book formatBookTemplate: 'toAccessRanking' request: request response: response shelf: shelf), '</h3>'].
return contents



refs → template (book) → accessListing "表示用体裁テンプレート"

<li><a href="<?toDefault?>"><?name?></a> <font size=-1><?accessCount?><font color=gray> 最終更新:<?date?>, <?time?> &lt;<?user?>&gt;</font></font>


refs → template (book) → toAccessRanking "移動用テンプレート作成"

<a href="<?toAccessRanking?>">全ページのアクセス状況</a>


refs → actions (book) → toAccessRanking "移動用アクション作成"

request referenceShelf: shelf book: book address: 'accessRanking'


refs → addresses (book) → accessRanking "アドレス作成"

book formatBookTemplate: 'accessRanking' request: request response: response shelf: shelf


refs → templates (book) → accessRanking "テンプレート作成"

<?doctype?>
<html>
<head>
<title><?bookName?></title>
<?endHead?></head>
<body<?colorScheme?>>
<?beforeButtons?><?showButtons?><?afterButtons?>
<h2>アクセス状況</h2>
<?accessRanking?>
<?endBody?></body>
</html>



refs → actions (book) → accessRanking "アクション作成"

| sortedPages return pagenAccesses |
pagenAccesses _ book pages collect: [ :page |
  {page. ExAccessCounter default atBook: book page: page}].
sortedPages _ (pagenAccesses asSortedCollection: [:x :y | x last > y last])
  collect: [ :pagenAccess | pagenAccess first].
return _ WriteStream on: String new.
return nextPutAll: '<ul>', String crlf.
sortedPages do: [ :page |
  return nextPutAll: (book formatPageTemplate: 'accessListing' request: request response: response shelf: shelf page: page)].
return nextPutAll: '</ul>', String crlf.
return contents


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


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

This page has been visited 2423 times.