Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Implement global and organisations view #419

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

Garfield-fr
Copy link
Contributor

@Garfield-fr Garfield-fr commented Jul 31, 2019

  • Adds new parameter on url to implement view

Co-Authored-by: Bertrand Zuchuat [email protected]

How to Test

  • script/bootstrap
  • script/setup
  • Global view http://localhost:5000
  • Organisation view http://localhost:5000/aoste
  • Test organisation or library facet
  • All items in global view
  • Items are filtered in view organisation

@Garfield-fr Garfield-fr force-pushed the zub-#914-organizations-views branch 8 times, most recently from b901175 to 7af75cf Compare August 6, 2019 06:18
@Garfield-fr Garfield-fr removed the WIP label Aug 6, 2019
@pronguen pronguen self-requested a review August 6, 2019 13:25
Copy link
Contributor

@pronguen pronguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • View homepage: make the link name to global view more precise: RERO ILS global
  • Autocomplete: suggestions must base on the view"s documents
  • Autocomplete: link to MEF persons are broken
  • From an admin page, link is broken to a public page
  • When I logout from an institution view, I land on the homepage of the global view
  • Authenticated patrons
    • are not able to access any pages of the institution"s views
    • are not able to login to their institution"s view (only to global view)
  • Admin options (we need to find and choose a solution)
    • Links from admin pages to public pages are broken (for instance using the main search bar)
    • Admin options are displayed on view of Org 2 for a librarian of Org 1: it is confusing

@Garfield-fr Garfield-fr force-pushed the zub-#914-organizations-views branch 4 times, most recently from 85a1239 to 094214d Compare August 7, 2019 10:55
rero_ils/modules/documents/listener.py Outdated Show resolved Hide resolved
rero_ils/modules/documents/serializers.py Show resolved Hide resolved
rero_ils/modules/documents/utils.py Outdated Show resolved Hide resolved
rero_ils/modules/libraries/api.py Outdated Show resolved Hide resolved
@BadrAly BadrAly self-requested a review August 7, 2019 13:23
@pronguen pronguen self-requested a review August 7, 2019 14:01
Copy link
Contributor

@pronguen pronguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous problems are solved! 👍
(except admin options displayed on view of Org 2 for a librarian of Org 1)

Two additional problems observed

  • Autocomplete: suggestions for persons must base on the view"s documents
  • Person detailed view: links to documents must base on the view"s documents

@Garfield-fr Garfield-fr force-pushed the zub-#914-organizations-views branch 2 times, most recently from 80da728 to 4143047 Compare August 8, 2019 08:34
@Garfield-fr Garfield-fr force-pushed the zub-#914-organizations-views branch from 4143047 to d25fc70 Compare August 8, 2019 09:32
@Garfield-fr Garfield-fr force-pushed the zub-#914-organizations-views branch from d25fc70 to f486ad9 Compare August 8, 2019 09:38
data/organisations.json Outdated Show resolved Hide resolved


def document_items_filter(org_pid, items):
"""Items filter for organisation document."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be more concise with the use of filter: http://book.pythontips.com/en/latest/map_filter.html#filter

@@ -752,3 +757,9 @@ def organisation_pid(self):
"""Get organisation pid for item."""
library = Library.get_record_by_pid(self.library_pid)
return library.organisation_pid

@property
def organisation_view(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

organisation_viewcode?

rero_ils/modules/mef_persons/views.py Show resolved Hide resolved


blueprint = Blueprint(
'item',
__name__,
url_prefix='/item',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it different than mef_person blueprint?

rero_ils/modules/organisations/api.py Outdated Show resolved Hide resolved
rero_ils/modules/organisations/api.py Outdated Show resolved Hide resolved
rero_ils/modules/organisations/api.py Outdated Show resolved Hide resolved
tests/unit/test_documents_utils.py Outdated Show resolved Hide resolved
* Adds new parameter on url to implement view

Co-Authored-by: Bertrand Zuchuat <[email protected]>
@Garfield-fr Garfield-fr force-pushed the zub-#914-organizations-views branch from f486ad9 to 1f8b43b Compare August 8, 2019 13:03
@Garfield-fr Garfield-fr merged commit 2726ef6 into rero:dev Aug 8, 2019
@Garfield-fr Garfield-fr deleted the zub-#914-organizations-views branch August 9, 2019 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants