Creating UI functionality for import page error handling.
This commit is contained in:
parent
9b65bac64e
commit
75e73933d9
@ -61,6 +61,12 @@ LeDatabase >> docTreeForLink: aString [
|
||||
^ (XMLHTMLParser on: aString asUrl retrieveContents) parseDocument
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> errors [
|
||||
|
||||
^ self optionAt: 'errors' ifAbsent: [ self optionAt: 'errors' put: Dictionary new ]
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> gtViewErrorDetailsOn: aView [
|
||||
<gtView>
|
||||
@ -76,19 +82,21 @@ LeDatabase >> gtViewErrorDetailsOn: aView [
|
||||
c horizontal matchParent ];
|
||||
padding: (BlInsets all: 10).
|
||||
container
|
||||
addChildren: (self errorCardFor: String loremIpsum)
|
||||
addChildren: (self errorCardFor: self errors associations first value)
|
||||
"container addChild: self asCardElement "].
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> importErrorMessage: page [
|
||||
|
||||
^ String streamContents: [ :stream |
|
||||
| message id |
|
||||
id := page uidString.
|
||||
message := String streamContents: [ :stream |
|
||||
stream
|
||||
nextPutAll: 'IMPORTATION ERROR: a page with';
|
||||
nextPut: Character lf;
|
||||
nextPut: Character lf;
|
||||
nextPutAll: ' id: ' , page uidString;
|
||||
nextPutAll: ' id: ' , id;
|
||||
nextPut: Character lf;
|
||||
nextPutAll: ' title: ' , page contentAsString;
|
||||
nextPut: Character lf;
|
||||
@ -100,5 +108,12 @@ LeDatabase >> importErrorMessage: page [
|
||||
'Please do one of those before retrying this procedure:
|
||||
|
||||
1) Move the existing page files (.lepiter and .bak) to another (sub)folder.
|
||||
2) Import the page url to another database.' ]
|
||||
2) Import the page url to another database.' ].
|
||||
self errors at: id put: message
|
||||
]
|
||||
|
||||
{ #category : #'*MiniDocs' }
|
||||
LeDatabase >> options [
|
||||
|
||||
^ options
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user