<a href="<?toCreate?>?name=<?newSendName?>"><b><?newShowNameWithAlias?></b></a><?createType?>
request referenceShelf: shelf book: book address: 'create'
book formatBookTemplate: 'create' request: request response: response shelf: shelf
<?doctype?> <html> <head> <title>新規ページの作成</title> <?endHead?></head> <body<?colorScheme?>> <?beforeButtons?><?showButtons?><?afterButtons?> <br><br> <form action="<?toNew?>" method=post> <b>タイトル <font color=gray>(参照元でのリンク名)</font> :</b> <input type="text" size=50 value="<?initName?>" name="name"> <br><br> <textarea name="text" rows=20 cols=90 wrap=virtual><?editText?></textarea><br> <input type="submit" value="この内容で新しいページを作成"><br> </form> <?endBody?></body> </html>
request fieldsKey: 'name' ifAbsent: ['名称未設定']
book formatBookTemplate: 'newText' request: request response: response shelf: shelf
request referenceShelf: shelf book: book page: book pages first address: 'create'
申しわけありません。まだ <?initName?> についての記述はありません。 Webブラウザの「戻る」ボタンで、もとの画面に戻れます。
"Create a new page" | newPage scheme type | (request fieldsHasKey: 'name') ifTrue: [(book hasPageNamed: (request fieldsKey: 'name')) ifTrue: [book formatPageTemplate: 'editUnlockedResolve' request: request response: response shelf: shelf page: (book pageNamed: (request fieldsKey: 'name'))] ifFalse: ["Add New Page" newPage _ book addNewPage. newPage forbidWriting; date: Date today; time: Time now; name: (request fieldsKey: 'name'); user: 'unknown'. type _ request fieldsKey: 'type' ifAbsent: ['text-default']. (book formatPrivAddress: 'allSchemes' request: request response: response shelf: shelf) do: [:i | ((i at: 1) = (page settingsAt: 'scheme' ifAbsent: ['default'])) ifTrue: [scheme _ i]]. ((scheme at: 4) = 'default') ifFalse: [newPage settingsAt: 'scheme' put: (scheme at: 4)]. (type beginsWith: 'text-') ifTrue: [(type = 'text-default') ifTrue: [newPage text: (request fieldsKey: 'text' ifAbsent: [''])] ifFalse: [newPage text: ''; settingsAt: 'template' put: (type copyFrom: 6 to: type size)]] ifFalse: [ newPage text: ''; settingsAt: 'isText' put: false. (type = 'project-default') ifFalse: [newPage settingsAt: 'template' put: (type copyFrom: 9 to: type size)]]. [newPage user: (shelf formatPrivAddress: 'getIPName' request: request response: response); write; permitWriting] fork. (book pages select: [ :pg | pg textContains: newPage name, '*' caseSensitive: true ]) do: [ :pg | (pg settingsAt: 'isText' ifAbsent: [true]) ifTrue: [[ pg forbidWriting; updateFormatRequest: request response: response shelf: shelf book: book; permitWriting ] fixTemps; fork]]. response at: 'headerStatus' put: #tempMoved. response at: 'location' put: (request referenceShelf: shelf book: book page: newPage). book formatPageTemplate: 'newSuccess' request: request response: response shelf: shelf page: newPage]] ifFalse: [response at: 'headerStatus' put: #notFound. book formatBookTemplate: 'addressNotFound' request: request response: response shelf: shelf]
"name, description, privileges name=aString description=aString privileges=aSwikiSecurityPrivileges" | values value | values _ OrderedCollection new. "Deny All" value _ Array new: 3. value at: 1 put: 'Deny All'; at: 2 put: 'No access to the site at all'; at: 3 put: (SwikiSecurityPrivileges named: 'Deny All' default: false). values add: value. "Read Only" value _ Array new: 3. value at: 1 put: 'Read Only'; at: 2 put: 'Only able to view the site'; at: 3 put: ((SwikiSecurityPrivileges named: 'Read Only' default: true) addAddress: 'append.page'; addAddress: 'upload.page'; addAddress: 'attach.page'; addAddress: 'edit.page'; addAddress: 'new.page'; addAddress: 'create.page'; addAddress: 'render.book'; addAddress: 'save.page'; yourself). values add: value. "Read & Append" value _ Array new: 3. value at: 1 put: 'Append'; at: 2 put: 'Able to view the site and use append areas.'; at: 3 put: ((SwikiSecurityPrivileges named: 'Append' default: true) addAddress: 'upload.page'; addAddress: 'attach.page'; addAddress: 'edit.page'; addAddress: 'new.page'; addAddress: 'create.page'; addAddress: 'render.book'; addAddress: 'save.page'; yourself). values add: value. "Write" value _ Array new: 3. value at: 1 put: 'Write'; at: 2 put: 'Able to edit pages, but cannot upload files.'; at: 3 put: ((SwikiSecurityPrivileges named: 'Write' default: true) addAddress: 'upload.page'; addAddress: 'attach.page'; addAddress: 'render.book'; yourself). values add: value. "Allow All" value _ Array new: 3. value at: 1 put: 'Allow All'; at: 2 put: 'Able to do anything'; at: 3 put: (SwikiSecurityPrivileges named: 'Allow All' default: true). values add: value. values
このページを編集 (5820 bytes)
以下の 1 ページから参照されています。 |
This page has been visited 2549 times.