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

Implement RAC Style Library into Aurora #683

Open
wants to merge 69 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
2b47cc7
remove uploads by user, fix #658
HaSistrunk May 16, 2024
f1c5eeb
remove org recent transfer table
HaSistrunk May 16, 2024
c23bebc
Merge branch 'development' into issue-667
HaSistrunk Sep 18, 2024
0fdd9cc
consolidate navigation into header nav
HaSistrunk Sep 18, 2024
ac34501
use standard public RAC footer
HaSistrunk Sep 18, 2024
bf2ad3a
add skip link
HaSistrunk Sep 19, 2024
13df807
remove vendor scripts and styles
HaSistrunk Sep 20, 2024
25528ef
update datatables and /transfers table
HaSistrunk Sep 20, 2024
7b5ea1e
use html progress element for progress bars
HaSistrunk Sep 20, 2024
23afbca
be explicit about which datatables styles are local
HaSistrunk Sep 20, 2024
d8419f4
improve button layout on /transfers page
HaSistrunk Sep 20, 2024
e2ee349
update search input and pagination styles
HaSistrunk Sep 20, 2024
747a647
initial rac styles implementation for transfer detail page
HaSistrunk Sep 21, 2024
01fec19
replace appraise details modal with table link to transfer details page
HaSistrunk Sep 22, 2024
198b7fb
add secondary footer with Aurora docs links + simplify header link text
HaSistrunk Sep 23, 2024
ae0ee57
improve pattern to get transfer detail url for appraise table
HaSistrunk Sep 23, 2024
eb7a5a9
remove appraise details test
HaSistrunk Sep 24, 2024
05ff41d
standardize datatables and remove unnecessary configs that match data…
HaSistrunk Sep 24, 2024
0900266
update title layouts, remove accession and appraisal queue transfer t…
HaSistrunk Sep 24, 2024
b41a827
update appraisal queue styles
HaSistrunk Sep 24, 2024
0e7c141
prevent label text wrapping in table btns + set page max width
HaSistrunk Sep 25, 2024
acabca0
add link to appraisal queue to improve ux for appraisers viewing tran…
HaSistrunk Sep 25, 2024
bbe2e70
implement tablist for accessioning queue
HaSistrunk Sep 26, 2024
82d3a24
simplify users page to one datatable
HaSistrunk Sep 26, 2024
0f478c4
implement styles for user detail page
HaSistrunk Sep 26, 2024
041067f
remove browseable api+schema and update header navigation menus
HaSistrunk Sep 27, 2024
2dce2d8
linting and readme change for browseable api updates
HaSistrunk Sep 30, 2024
0e924c9
implement styles for orgs and users pages
HaSistrunk Sep 30, 2024
db1f41c
implement accession form styles
HaSistrunk Oct 2, 2024
ce22838
use RAC style library alert colors + make all alerts dismissible
HaSistrunk Oct 2, 2024
76e0c52
add alert when AS resource is added + update messages.html for alert …
HaSistrunk Oct 2, 2024
a8491ad
implement add/edit orgs and users
HaSistrunk Oct 9, 2024
e18352c
update login pages layout + styles, but not yet form validation
HaSistrunk Oct 9, 2024
1f99ab0
cleanup password change form
HaSistrunk Oct 10, 2024
4d2045e
implement styles for bag-it view page
HaSistrunk Oct 10, 2024
8ee70f9
Merge branch 'development' into issue-667
HaSistrunk Oct 10, 2024
32cd1b2
Merge branch 'development' into issue-667
HaSistrunk Oct 10, 2024
9efff9b
implement rights statement view styles
HaSistrunk Oct 11, 2024
375a916
use local font and cleanup login and header nav styles
HaSistrunk Oct 15, 2024
9b102a5
Merge branch 'issue-667' of https://github.com/RockefellerArchiveCent…
HaSistrunk Oct 15, 2024
fd06ce2
adjust table fixedHeader to no fixed site header
HaSistrunk Oct 15, 2024
f321e03
update bag-it profile creation form
HaSistrunk Oct 22, 2024
305ff73
linting
HaSistrunk Oct 23, 2024
2dc656a
troubleshoot dynamic form input and label indices
HaSistrunk Oct 23, 2024
0847e82
implement styles for create rights form
HaSistrunk Oct 23, 2024
d8470e6
revert model changes for bagit forms (still need updates for change f…
HaSistrunk Oct 24, 2024
82fa7b9
implement micromodal and add appraisal modals
HaSistrunk Oct 24, 2024
96a13cc
cleanup
HaSistrunk Oct 24, 2024
2294e9d
implement micromodals for orgs page
HaSistrunk Oct 25, 2024
30a12a9
Simplify/update dashboard
HaSistrunk Oct 28, 2024
d362cdd
improve transfer details page + cleanup
HaSistrunk Oct 28, 2024
9d18fe5
implement responsive tables correctly and limit fixedHeaders in datat…
HaSistrunk Oct 29, 2024
ee67074
cleanup table styling and remove pointer row links for a11y
HaSistrunk Oct 29, 2024
385ecf3
add homepage signposts and remove paragraphs from header links
HaSistrunk Oct 29, 2024
e0a79e0
add more responsive cta button styles
HaSistrunk Oct 29, 2024
cdd2d48
use consistent login/password reset form widths
HaSistrunk Oct 30, 2024
206255e
cleanup and reorder styles
HaSistrunk Oct 30, 2024
a134c44
remove unused sources and add rac assets to CSP settings
HaSistrunk Oct 30, 2024
2b3ec60
enable closing alert messages in script
HaSistrunk Oct 30, 2024
fe676e1
implement focus management with DOM deletion and debug delete script
HaSistrunk Oct 30, 2024
cbd2a54
remove moment.js
HaSistrunk Nov 1, 2024
8061c74
remove statesave on transfers datatable
HaSistrunk Nov 1, 2024
3020150
expand dashboard transfer status info, fix #555
HaSistrunk Nov 1, 2024
7636fa4
remove unused filesize script
HaSistrunk Nov 5, 2024
13d623d
add styles for form errors + style todos
HaSistrunk Nov 14, 2024
1022c66
improve UI clarity and cleanup
HaSistrunk Nov 15, 2024
e1eda64
bagit form troubleshooting
HaSistrunk Nov 15, 2024
18949e7
update password change form layout
HaSistrunk Nov 15, 2024
3d2c343
use only a single formset
helrond Nov 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ instead:

## API

Aurora comes with a RESTful API, built using the Django Rest Framework. In addition to interacting with the API via your favorite command-line client, you can also use the browsable API interface available in the application.
Aurora comes with a RESTful API, built using the Django Rest Framework, accessible via any command-line client.

### Authentication

Expand Down Expand Up @@ -153,7 +153,7 @@ contains code which demonstrates this flow (see the `authorize` method in

## Django Admin Configuration

Aurora comes with the default [Django admin site](https://docs.djangoproject.com/en/1.11/ref/contrib/admin/). Only users with superuser privileges are able to view this interface, which can be accessed by clicking on the profile menu and selecting "Administration".
Aurora comes with the default [Django admin site](https://docs.djangoproject.com/en/1.11/ref/contrib/admin/). Only users with superuser privileges are able to view this interface, available via the "Admin" navigation menu.

In addition to allowing for the manual creation and deletion of certain objects, this interface also allows authorized users to edit system values which are used by the application, including the human-readable strings associated with Bag Log Codes. Care should be taken when making changes in the Django admin interface, particularly the creation or deletion of objects, since they can have unintended consequences.

Expand Down
34 changes: 7 additions & 27 deletions aurora/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@
WSGI_APPLICATION = "aurora.wsgi.application"

REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 50,
"DEFAULT_AUTHENTICATION_CLASSES": (
# "rest_framework_jwt.authentication.JSONWebTokenAuthentication",
"bag_transfer.authentication.CognitoAppAuthentication",
"rest_framework.authentication.SessionAuthentication",
),
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
)
}

# Database
Expand Down Expand Up @@ -164,10 +165,10 @@

# Content Security Policy
CSP_DEFAULT_SRC = ("'self'", 'https://rockarch.matomo.cloud/')
CSP_IMG_SRC = ("'self'")
CSP_STYLE_SRC = ("'self'", "'unsafe-inline'", 'https://cdnjs.cloudflare.com/', 'https://fonts.googleapis.com/')
CSP_SCRIPT_SRC = ("'self'", "'unsafe-inline'", "'unsafe-eval'", 'https://cdnjs.cloudflare.com/', 'https://oss.maxcdn.com/', 'https://cdn.matomo.cloud/', 'https://cdn.datatables.net/')
CSP_FONT_SRC = ("'self'", 'https://fonts.gstatic.com', 'https://cdnjs.cloudflare.com/')
CSP_IMG_SRC = ("'self'", 'https://assets.rockarch.org/')
CSP_STYLE_SRC = ("'self'", "'unsafe-inline'", 'https://assets.rockarch.org/')
CSP_SCRIPT_SRC = ("'self'", "'unsafe-inline'", "'unsafe-eval'", 'https://cdn.matomo.cloud/', 'https://cdn.datatables.net/')
CSP_FONT_SRC = ("'self'", 'https://assets.rockarch.org/')

# Transfer settings
S3_USE = config.S3_USE
Expand Down Expand Up @@ -227,27 +228,6 @@
# Matomo Analytics configs
MTM_ID = config.MTM_ID

# List of colors used in dashboard for record types
RECORD_TYPE_COLORS = [
"#f56954",
"#00a65a",
"#f39c12",
"#00c0ef",
"#3c8dbc",
"#d2d6de",
"#f56954",
"#00a65a",
"#f39c12",
"#00c0ef",
"#3c8dbc",
"#d2d6de",
"#f56954",
"#00a65a",
"#f39c12",
"#00c0ef",
"#3c8dbc",
"#d2d6de",
]

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

Expand Down
16 changes: 8 additions & 8 deletions bag_transfer/accession/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ class Meta:
}
help_texts = {}
widgets = {
"title": forms.widgets.TextInput(attrs={"class": "form-control"}),
"title": forms.widgets.TextInput(),
"start_date": forms.widgets.DateInput(
attrs={"class": "form-control", "type": "date"}
attrs={"type": "date"}
),
"end_date": forms.widgets.DateInput(
attrs={"class": "form-control", "type": "date"}
attrs={"type": "date"}
),
"description": forms.widgets.Textarea(
attrs={"class": "form-control", "rows": 3}
attrs={"rows": 3}
),
"access_restrictions": forms.widgets.Textarea(
attrs={"class": "form-control", "rows": 3}
attrs={"rows": 3}
),
"use_restrictions": forms.widgets.Textarea(
attrs={"class": "form-control", "rows": 3}
attrs={"rows": 3}
),
"resource": forms.widgets.HiddenInput(),
"accession_number": forms.widgets.HiddenInput(),
Expand All @@ -52,7 +52,7 @@ class Meta:
fields=("name", "type"),
extra=0,
widgets={
"name": forms.widgets.TextInput(attrs={"class": "form-control col-sm-8"}),
"type": forms.widgets.Select(attrs={"class": "form-control"}),
"name": forms.widgets.TextInput(),
"type": forms.widgets.Select(),
},
)
17 changes: 5 additions & 12 deletions bag_transfer/appraise/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ def get(self, request, *args, **kwargs):
except Transfer.DoesNotExist as e:
rdata["emess"] = e
return self.render_to_json_response(rdata)

if request.GET.get("req_form") == "detail":
rdata["object"] = upload.id
rdata["success"] = 1

elif (
if (
request.GET.get("req_form") == "appraise" and request.user.can_appraise()
):
if request.GET.get("req_type") == "decision":
Expand Down Expand Up @@ -96,10 +91,9 @@ def get_filter_method(self):
return self.FILTER_ICONTAINS

def appraise_buttons(self, transfer):
buttons = '<a type="button" class="transfer-detail btn btn-xs btn-warning" data-toggle="modal" data-target="#modal-detail" aria-expanded="false" href="#">Details</a>'
if self.request.user.can_appraise():
if transfer.appraisal_note:
btn_class = "btn-primary"
btn_class = "btn btn--xs btn--light-blue"
note_class = "edit-note"
aria_label = 'aria-label="Note exists"'
note_text = "Edit"
Expand All @@ -108,10 +102,9 @@ def appraise_buttons(self, transfer):
note_class = ""
aria_label = ""
note_text = "Add"
buttons = '<a type=button class="btn btn-xs btn-primary appraisal-accept" href="#">Accept</a>\
<a type="button" class="btn btn-xs btn-danger appraisal-reject" href="#">Reject</a>\
<a type="button" class="appraisal-note btn btn-xs {} {}" data-toggle="modal" data-target="#modal-appraisal-note" href="#" {}>{} Note</a>\
<a type="button" class="transfer-detail btn btn-xs btn-warning" data-toggle="modal" data-target="#modal-detail" aria-expanded="false" href="#">Details</a>'.format(
buttons = '<button class="btn btn--xs btn--blue appraisal-accept">Accept</button>\
<button class="btn btn--xs btn--orange appraisal-reject">Reject</button>\
<button class="btn btn--xs btn--light-blue appraisal-note {} {}" "data-target="#modal-appraisal-note" {}>{} Note</button>'.format(
btn_class, note_class, aria_label, note_text
)
return buttons
Expand Down
Loading
Loading