ロゴ移動、コメント追加、列挙順変更など
[shelf] → templaes (shelf) → list "見栄え調整、コメント追加"
<?doctype?>
<html>
<head>
<title>Swikis on <?name?></title>
</head>
<body<?colorScheme?>>
<h2>Swikis on <?name?></h2>
<?swikiListing?>
<?logo?>
</body>
</html>
↓
<?doctype?>
<html>
<head>
<title><?name?></title>
</head>
<body<?colorScheme?>>
<h2><?name?></h2>
<p><font color=gray>本サイトには以下の <?countSwikiBooks?> 冊の Swiki ブックがあります。<br>最近、更新されたものから順に表示しています。</font><p>
<?swikiListing?>
<br>
<?logo?>
</body>
</html>
[shelf] → templates (shelf) → logo "ロゴを右端へ移動"
<a href="http://minnow.cc.gatech.edu/swiki"><?comancheImage?></a><br>
<em>Comanche 5.0 / Swiki 1.3</em><br>
↓
<p align=right>Powered by <em>Squeak</em> and <a href="http://minnow.cc.gatech.edu/swiki"><?comancheImage?></a><br>
<em>Comanche 5.0 / Swiki 1.3</em><br></p>
[shelf] → actions (shelf) → countSwikiBooks "Swiki ブック数表示のための追加アクション"
(shelf books select: [:book | book setup at: 'visible' ifAbsent: [true]]) size asString
[shelf] → actions (shelf) → swikiListing "列挙順変更"
| return swikis |
"Sort Swikis Alphabetically"
swikis _ shelf books asSortedCollection: [:a :b | (a name) < (b name)].
return _ WriteStream on: String new.
return
nextPutAll: '<ul>';
nextPutAll: String crlf.
swikis do: [:book | (book setup at: 'visible' ifAbsent: [true])
ifTrue: [return
nextPutAll: '<li>';
nextPutAll: (shelf formatBookTemplate: 'listing' request: request response: response book: book);
nextPutAll: String crlf]].
return
nextPutAll: '</ul>';
contents
↓
| return swikis swikisCol swikis0 |
"Sort Swikis by its Modified Date and Time"
swikis0 _ shelf books select: [ :book |
(book setup at: 'visible' ifAbsent: [true]) and: [book pages isNil]].
swikisCol _ (shelf books select: [ :book |
(book setup at: 'visible' ifAbsent: [true])
and: [book pages notNil]]) collect: [ :book |
{book. (book pages asSortedCollection: [:x :y |
(x date = y date) ifTrue: [x time > y time] ifFalse: [x date > y date]]) first}].
swikis _ (swikisCol asSortedCollection: [:x :y |
(x last date = y last date)
ifTrue: [x last time > y last time]
ifFalse: [x last date > y last date]]) collect: [ :item | item first ].
swikis addAll: swikis0.
return _ WriteStream on: String new.
return
nextPutAll: '<ul>';
nextPutAll: String crlf.
swikis do: [:book | (book setup at: 'visible' ifAbsent: [true])
ifTrue: [return
nextPutAll: '<li>';
nextPutAll: (shelf formatBookTemplate: 'listing' request: request response: response book: book);
nextPutAll: String crlf]].
return
nextPutAll: '</ul>';
contents
[shelf] → templates (book) → listing "Swiki ブック一覧表示フォーマット変更"
<a href="<?toBook?>"><?name?></a><?size?><?description?>
↓
<a href="<?toBook?>"><?description?></a> 全 <?size?> ページ<?accessCountDateUser?>
[shelf] → actiotns (book) → size "ページ数表示アクション変更"
(book pages)
ifNil: ['']
ifNotNil: [' (', (book pages size asString), ')']
↓
(book pages)
ifNil: ['']
ifNotNil: [' (全 ', (book pages size asString), ' ページ)']
[shelf] → actions (book) → accessCountDateUser "最新更新ページの更新日/更新者取得用アクション作成"
| pages lastModifiedPage user |
(pages _ book pages)
ifNil: ['']
ifNotNil: [
'<font color=gray size=-1>(', (pages collect: [ :page |
ExAccessCounter default atBook: book page: page]) sum printString, ') ',
' <a href="',
(request
referenceShelf: shelf
book: book
page: (lastModifiedPage _ (pages asSortedCollection: [:x :y |
(x date = y date) ifTrue: [x time > y time] ifFalse: [x date > y date]]) first)),
'">最終更新</a>: ', lastModifiedPage printDate, ', ', lastModifiedPage printTime, ' <',
((user _ lastModifiedPage user)
ifNil: ['unknown']
ifNotNil: [(user _ user copyFrom: 1 to: (user size min: 3)) = ''
ifFalse: [user]
ifTrue: ['unknown']]),
'></font>']
[shelf] → actions (book) → description "Swiki ブック表題表記変更"
(book settingsIncludes: 'description')
ifTrue: [': ', (book settingsAt: 'description')]
ifFalse: ['']
↓
(book settingsIncludes: 'description')
ifTrue: [book settingsAt: 'description']
ifFalse: ['unnamed swiki']
このページを編集 (5660 bytes)
|
以下の 1 ページから参照されています。 |
This page has been visited 2469 times.