diff --git a/RIGS/models.py b/RIGS/models.py index b814fff2..c7642a61 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -473,7 +473,7 @@ class Event(models.Model, RevisionMixin): return reverse_lazy('event_detail', kwargs={'pk': self.pk}) def __str__(self): - return self.display_id + ": " + self.name + return "{}: {}".format(self.display_id, self.name) def clean(self): errdict = {} diff --git a/RIGS/views.py b/RIGS/views.py index 8825ddfe..4fa6c572 100644 --- a/RIGS/views.py +++ b/RIGS/views.py @@ -20,7 +20,7 @@ from RIGS import models, forms from assets import models as asset_models from functools import reduce -from PyRIGS.views import GenericListView,GenericDetailView +from PyRIGS.views import GenericListView, GenericDetailView class PersonList(GenericListView): @@ -43,8 +43,8 @@ class PersonDetail(GenericDetailView): context['history_link'] = 'person_history' context['detail_link'] = 'person_detail' context['update_link'] = 'person_update' - context['associated'] ='partials/associated_organisations.html' - context['associated2'] ='partials/associated_events.html' + context['associated'] = 'partials/associated_organisations.html' + context['associated2'] = 'partials/associated_events.html' return context @@ -95,6 +95,7 @@ class OrganisationList(GenericListView): context['union_account'] = True return context + class OrganisationDetail(GenericDetailView): model = models.Organisation @@ -103,10 +104,11 @@ class OrganisationDetail(GenericDetailView): context['history_link'] = 'organisation_history' context['detail_link'] = 'organisation_detail' context['update_link'] = 'organisation_update' - context['associated'] ='partials/associated_people.html' - context['associated2'] ='partials/associated_events.html' + context['associated'] = 'partials/associated_people.html' + context['associated2'] = 'partials/associated_events.html' return context + class OrganisationCreate(generic.CreateView): template_name = 'organisation_form.html' model = models.Organisation diff --git a/assets/tests/pages.py b/assets/tests/pages.py index 1789572b..0f1c08f4 100644 --- a/assets/tests/pages.py +++ b/assets/tests/pages.py @@ -124,7 +124,7 @@ class SupplierList(BasePage): URL_TEMPLATE = reverse('supplier_list') _supplier_item_locator = (By.ID, 'row_item') - _search_text_locator = (By.XPATH, '//*[@id="main"]/div[2]/form/div/input') + _search_text_locator = (By.ID, 'id_search_text') _go_button_locator = (By.ID, 'id_search') class SupplierListRow(Region): diff --git a/templates/generic_list.html b/templates/generic_list.html index a945d418..6a9ba00e 100644 --- a/templates/generic_list.html +++ b/templates/generic_list.html @@ -12,7 +12,7 @@ {% csrf_token %}
+ class="form-control" id="id_search_text"/> {% button 'search' id="id_search" %}
diff --git a/users/templates/profile_detail.html b/users/templates/profile_detail.html index f8515cec..2cf4de0a 100644 --- a/users/templates/profile_detail.html +++ b/users/templates/profile_detail.html @@ -145,6 +145,6 @@

Events

{% with object.latest_events as events %} - {% include 'event_table.html' %} + {% include 'partials/event_table.html' %} {% endwith %} {% endblock %}