-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lepiter card: add Spotter button [feenkcom/gtoolkit#3847]
- Loading branch information
1 parent
075a95a
commit aa8d09f
Showing
2 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
src/GToolkit-World/GtHomeLepiterKnowledgeBaseSpotterStart.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Class { | ||
#name : #GtHomeLepiterKnowledgeBaseSpotterStart, | ||
#superclass : #Object, | ||
#instVars : [ | ||
'databaseProvider' | ||
], | ||
#category : #'GToolkit-World-Helpers' | ||
} | ||
|
||
{ #category : #accessing } | ||
GtHomeLepiterKnowledgeBaseSpotterStart >> database [ | ||
<return: #LeDatabase> | ||
^ self databaseProvider database | ||
] | ||
|
||
{ #category : #accessing } | ||
GtHomeLepiterKnowledgeBaseSpotterStart >> databaseProvider [ | ||
^ databaseProvider | ||
] | ||
|
||
{ #category : #accessing } | ||
GtHomeLepiterKnowledgeBaseSpotterStart >> databaseProvider: anObject [ | ||
"Database provider is an object that understand #database" | ||
|
||
databaseProvider := anObject | ||
] | ||
|
||
{ #category : #searching } | ||
GtHomeLepiterKnowledgeBaseSpotterStart >> gtSpotterForPagesByContentFor: aSearch [ | ||
<gtSearch> | ||
^ aSearch explicit | ||
priority: 23; | ||
title: 'Page contents'; | ||
search: [ :aContext | self database asyncPagesContainingText: aContext searchQuery ]; | ||
itemName: #spotterItemName | ||
] | ||
|
||
{ #category : #searching } | ||
GtHomeLepiterKnowledgeBaseSpotterStart >> gtSpotterForPagesFor: aSearch [ | ||
<gtSearch> | ||
^ aSearch explicit | ||
title: 'Named pages'; | ||
priority: 1; | ||
search: [ :aContext | self database asyncPagesForWord: aContext searchQuery ]; | ||
itemName: #title; | ||
wantsToDisplayOnEmptyQuery: false | ||
] | ||
|
||
{ #category : #printing } | ||
GtHomeLepiterKnowledgeBaseSpotterStart >> printOn: aStream [ | ||
aStream nextPutAll: 'Spotter' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters