-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(search): Adding basic saved search crud
Signed-off-by: Vincent Boutour <[email protected]>
- Loading branch information
Showing
22 changed files
with
373 additions
and
67 deletions.
There are no files selected for viewing
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
{{ define "create-saved-search-modal" }} | ||
<div id="create-saved-search" class="modal saved-search-modal"> | ||
<div class="modal-content"> | ||
<h2 class="header">Create new saved-search</h2> | ||
|
||
<form method="post" action="#"> | ||
<input type="hidden" name="type" value="saved-search" /> | ||
<input type="hidden" name="method" value="PUT" /> | ||
|
||
<p class="padding no-margin"> | ||
<label for="name" class="block">Name</label> | ||
<input id="name" class="full" type="text" name="name" /> | ||
</p> | ||
|
||
{{ template "form_buttons" "Create" }} | ||
</form> | ||
</div> | ||
</div> | ||
{{ end }} | ||
|
||
{{ define "delete-saved-search-modal" }} | ||
<div id="delete-saved-search-modal-{{ .ID }}" class="modal delete-modal"> | ||
<div class="modal-content"> | ||
<h2 class="header">Confirmation</h2> | ||
|
||
<form method="post" action="#"> | ||
<input type="hidden" name="type" value="saved-search" /> | ||
<input type="hidden" name="method" value="DELETE" /> | ||
<input type="hidden" name="name" value="{{ .Name }}" /> | ||
|
||
<p class="padding no-margin center"> | ||
Are you sure you want to delete <strong>{{ .Name }}</strong>? | ||
</p> | ||
|
||
{{ template "form_buttons" "Confirm" }} | ||
</form> | ||
</div> | ||
</div> | ||
{{ end }} |
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
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
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
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
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
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
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,11 @@ | ||
package provider | ||
|
||
type Search struct { | ||
ID string `json:"id"` | ||
Name string `json:"name"` | ||
Query string `json:"query"` | ||
} | ||
|
||
func (s Search) IsZero() bool { | ||
return len(s.Name) != 0 | ||
} |
Oops, something went wrong.