-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
organisations: show organisation information
This commit shows information about the current organisation, as the title, the description and optionally a logo. Users can search for records that belong to this organisation only. * Enables REST endpoints for organisations files. * Enables UI endpoints for organisations files. * Associates un bucket when an organisation is created. * Adds `description`, `_bucket` and `_files` properties to JSON schema. * Adds `description` property to elasticsearch mapping. * Serializes `description`, `_bucket` and `_files` properties when organisation is retrieved by REST API. * Adds a Jinja filter to get an image URL for a record. * Displays organisation's information in front page and inner pages. * Searches only for global records in main search input. * Closes #268. Co-Authored-by: Sébastien Délèze <[email protected]>
- Loading branch information
Sébastien Délèze
committed
Sep 7, 2020
1 parent
86bb6fb
commit 775302d
Showing
15 changed files
with
219 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ | |
"pid": { | ||
"type": "keyword" | ||
}, | ||
"description": { | ||
"type": "text" | ||
}, | ||
"code": { | ||
"type": "keyword" | ||
}, | ||
|
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,41 @@ | ||
{% if g.get('organisation') and not g.organisation['isDedicated'] %} | ||
<div class="bg-light py-4"> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
{% set thumbnail = g.organisation | record_image_url %} | ||
{% if thumbnail %} | ||
<div class="col-6 col-lg-2"> | ||
<img src="{{ thumbnail }}" alt="{{ g.organisation.name }}" class="img-fluid"> | ||
</div> | ||
{% endif %} | ||
<div class="col-12 col-lg-{{ '10' if thumbnail else '12' }}"> | ||
<h1 class="mb-2">{{ g.organisation.name }}</h1> | ||
{% if g.organisation.get('description') %} | ||
<p class="mb-3 text-justify">{{ g.organisation.description | nl2br | safe }}</p> | ||
{% endif %} | ||
<div class="row"> | ||
<div class="col-12 col-lg-4"> | ||
<form action="{{ url_for('documents.search', view=view_code) }}" role="search"> | ||
<div class="input-group mb-2"> | ||
<input type="text" name="q" value="{{ request.args.get('q', '') }}" class="form-control" | ||
id="inlineFormInputGroup" placeholder="{{ _('Search') }}"> | ||
<div class="input-group-append"> | ||
<button type="submit" class="btn btn-primary mb-2"> | ||
<i class="fa fa-search"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="col text-right"> | ||
<a href="{{url_for('documents.index', view=config.SONAR_APP_DEFAULT_ORGANISATION)}}" | ||
class="btn btn-outline-primary"> | ||
{{_('Back to SONAR')}} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
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
Oops, something went wrong.