swiki ボタン追加
refs → actions (page) → showButtons "ボタン表示用アクション"
| return colorScheme |
return _ WriteStream on: (String new: 300).
colorScheme _ book modulesAt: 'colorScheme'.
"Page Buttons"
return nextPutAll: ((request address = 'default')
ifTrue: [colorScheme button: 'viewie']
ifFalse: [colorScheme button: 'view' link: (request referenceShelf: shelf book: book page: page)]).
return nextPutAll: ((request address = 'edit')
ifTrue: [(page settingsAt: 'lock' ifAbsent: [false])
ifTrue: [colorScheme button: 'editlockie']
ifFalse: [colorScheme button: 'editie']]
ifFalse: [(page settingsAt: 'isText' ifAbsent: [true])
ifTrue: [(page settingsAt: 'lock' ifAbsent: [false])
ifTrue: [colorScheme button: 'editlock' link: (request referenceShelf: shelf book: book page: page address: 'edit')]
ifFalse: [colorScheme button: 'edit' link: (request referenceShelf: shelf book: book page: page address: 'edit')]]
ifFalse: [colorScheme button: 'editbw']]).
return nextPutAll: ((request address = 'upload')
ifTrue: [colorScheme button: 'uploadie']
ifFalse: [colorScheme button: 'upload' link: (request referenceShelf: shelf book: book page: page address: 'upload')]).
return nextPutAll: ((request address = 'history')
ifTrue: [colorScheme button: 'historyie']
ifFalse: [colorScheme button: 'history' link: (request referenceShelf: shelf book: book page: page address: 'history')]).
"Divider"
return nextPutAll: (colorScheme formatTemplate: 'divider' request: request response: response shelf: shelf book: book).
"Bookshelf"
return nextPutAll: (colorScheme button: 'swikis' link: '/').
"Divider"
return nextPutAll: (colorScheme formatTemplate: 'divider' request: request response: response shelf: shelf book: book).
"Book Buttons"
return nextPutAll: ((page id = 1)
ifTrue: [colorScheme button: 'topie']
ifFalse: [colorScheme button: 'top' link: (request referenceShelf: shelf book: book)]).
return nextPutAll: (colorScheme button: 'recent' link: (request referenceShelf: shelf book: book address: 'recent')).
return nextPutAll: (colorScheme button: 'search' link: (request referenceShelf: shelf book: book address: 'search')).
return nextPutAll: (colorScheme button: 'help' link: (request referenceShelf: shelf book: book address: 'help')).
"Return Contents"
return contents
refs → actions (book) → showButtons "ボタン表示用アクション"
| return colorScheme |
return _ WriteStream on: (String new: 300).
colorScheme _ book modulesAt: 'colorScheme'.
"Page Buttons"
return
nextPutAll: (colorScheme button: 'viewbw');
nextPutAll: (colorScheme button: 'editbw');
nextPutAll: (colorScheme button: 'uploadbw');
nextPutAll: (colorScheme button: 'historybw').
"Divider"
return nextPutAll: (colorScheme formatTemplate: 'divider' request: request response: response shelf: shelf book: book).
"Bookshelf"
return nextPutAll: (colorScheme button: 'swikis' link: '/').
"Divider"
return nextPutAll: (colorScheme formatTemplate: 'divider' request: request response: response shelf: shelf book: book).
"Book Buttons"
return nextPutAll: (colorScheme button: 'top' link: (request referenceShelf: shelf book: book)).
return nextPutAll: ((request address = 'recent')
ifTrue: [colorScheme button: 'recentie']
ifFalse: [colorScheme button: 'recent' link: (request referenceShelf: shelf book: book address: 'recent')]).
return nextPutAll: ((request address = 'search')
ifTrue: [colorScheme button: 'searchie']
ifFalse: [colorScheme button: 'search' link: (request referenceShelf: shelf book: book address: 'search')]).
return nextPutAll: ((request address = 'help')
ifTrue: [colorScheme button: 'helpie']
ifFalse: [colorScheme button: 'help' link: (request referenceShelf: shelf book: book address: 'help')]).
"Return contents"
return contents
swiki/default/files/schemes/projectsu/tags.xml "Swiki ブックシェルフ移動ボタンへの alt タグ追加"
<button name="swikis" alt="Show all Swikis" />
refs → actions (book) → buttons "何のためのものか謎だけど一応追加しておく"
'"view", "edit", "editlock", "upload", "history", "swikis", "top", "recent", "search", "help"'
このページを編集 (4519 bytes)
|
以下の 1 ページから参照されています。 |
This page has been visited 2718 times.