Skip to content

Commit

Permalink
Merge pull request #62 from OdumInstitute/beta-2
Browse files Browse the repository at this point in the history
Beta 2 More Feedback Improvements and Tests
  • Loading branch information
matthew-a-dunlap authored Aug 16, 2022
2 parents 49c2ca6 + 01855a1 commit 9530ebe
Show file tree
Hide file tree
Showing 16 changed files with 1,607 additions and 263 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function create_file_table_config(table_path, readonly, is_submission, file_url_
stateSave: true,
paging: true,
select: 'single',
autoWidth: false,
// dom: 'Bftlp',
dom: 'Bfrtpl',
// keys: true, //for keyboard
Expand Down Expand Up @@ -70,7 +71,9 @@ function create_file_table_config(table_path, readonly, is_submission, file_url_
},
],
columnDefs: [
{ "width": "33px", "targets": 0 }
{ "width": "3%", "targets": 0 },
{ "width": "20%", "targets": 1 },
{ "width": "40%", "targets": 2 },
],
buttons: top_buttons
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="title-text">
<table id="file_table_{{obj_type}}" class="datatable table table-striped table-bordered filetable" cellspacing="0" width="100%">
<table id="file_table_{{obj_type}}" class="datatable table table-striped table-bordered table-fixed filetable" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
Expand Down Expand Up @@ -29,7 +29,7 @@
}
},
config['columns'].push(fourth_column)
fourth_column_def = { "width": "33px", "targets": 3 }
fourth_column_def = { "width": "1%", "targets": 3 }
config['columnDefs'].push(fourth_column_def)
{% comment %}{% endif %} {% endcomment %}
{% else %}
Expand Down
Binary file modified corere/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions corere/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-23 21:53+0000\n"
"POT-Creation-Date: 2022-08-04 22:01+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -275,7 +275,7 @@ msgstr "Your Submission for Manuscript #{manuscript_id}: {manuscript_display_nam

#: corere/main/views/main.py:61
msgid "index_pageTitle"
msgstr "My Manuscripts"
msgstr "Manuscripts"

#: corere/main/views/main.py:276
msgid "manuscript_landing_pageTitle"
Expand Down
12 changes: 6 additions & 6 deletions corere/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def __init__(self, *args, **kwargs):

# For editors adding authors during manuscript creation
class AuthorAddForm(forms.Form):
first_name = forms.CharField(label="Invitee First Name", max_length=150, required=True)
last_name = forms.CharField(label="Invitee Last Name", max_length=150, required=True)
first_name = forms.CharField(label="Invitee Given Name", max_length=150, required=True)
last_name = forms.CharField(label="Invitee Surname", max_length=150, required=True)
email = forms.EmailField(label="Invitee Email", max_length=settings.INVITATIONS_EMAIL_MAX_LENGTH, required=True)


Expand All @@ -168,8 +168,8 @@ def render(self, name, value, attrs=None, renderer=None):

# For admins add/removing authors
class AuthorInviteAddForm(forms.Form):
first_name = forms.CharField(label="Invitee First Name", max_length=150, required=False)
last_name = forms.CharField(label="Invitee Last Name", max_length=150, required=False)
first_name = forms.CharField(label="Invitee Given Name", max_length=150, required=False)
last_name = forms.CharField(label="Invitee Surname", max_length=150, required=False)
email = forms.EmailField(label="Invitee Email", max_length=settings.INVITATIONS_EMAIL_MAX_LENGTH, required=False)
# TODO: Add a text -or- inbetween here on the form. Also don't require First/Last/Email if the existing user is selected
users_to_add = ModelMultipleChoiceField(
Expand Down Expand Up @@ -247,8 +247,8 @@ class Meta:

# Note: not used on Authors, as we always want them assigned when created
class UserInviteForm(forms.Form):
first_name = forms.CharField(label="Invitee First Name", max_length=150, required=True)
last_name = forms.CharField(label="Invitee Last Name", max_length=150, required=True)
first_name = forms.CharField(label="Invitee Given Name", max_length=150, required=True)
last_name = forms.CharField(label="Invitee Surname", max_length=150, required=True)
email = forms.CharField(label="Invitee Email", max_length=settings.INVITATIONS_EMAIL_MAX_LENGTH, required=False)


Expand Down
23 changes: 23 additions & 0 deletions corere/main/migrations/0005_auto_20220804_2149.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.15 on 2022-08-04 21:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('main', '0004_auto_20220701_1705'),
]

operations = [
migrations.AlterField(
model_name='author',
name='first_name',
field=models.CharField(max_length=150, verbose_name='Given Name'),
),
migrations.AlterField(
model_name='author',
name='last_name',
field=models.CharField(max_length=150, verbose_name='Surname'),
),
]
4 changes: 2 additions & 2 deletions corere/main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ class IdScheme(models.TextChoices):
REID = "ResearcherID", "ResearcherID"
SCID = "ScopusID", "ScopusID"

first_name = models.CharField(max_length=150, blank=False, null=False, verbose_name="First Name")
last_name = models.CharField(max_length=150, blank=False, null=False, verbose_name="Last Name")
first_name = models.CharField(max_length=150, blank=False, null=False, verbose_name="Given Name")
last_name = models.CharField(max_length=150, blank=False, null=False, verbose_name="Surname")
identifier_scheme = models.CharField(max_length=14, blank=True, null=True, choices=IdScheme.choices, verbose_name="Identifier Scheme")
identifier = models.CharField(max_length=150, blank=True, null=True, verbose_name="Identifier")
# position = models.IntegerField(verbose_name='Position', help_text='Position/order of the author in the list of authors')
Expand Down
8 changes: 8 additions & 0 deletions corere/main/static/main/output.scss
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,14 @@ select.custom-select {
border-width: 1px;
}

.table-fixed {
table-layout: fixed;
}

.table-fixed td {
word-wrap: break-word;
}

#div_id_note_formset-0-scope {
width:160px;
}
Expand Down
2 changes: 1 addition & 1 deletion corere/main/templates/main/form_object_submission.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h5 class="title-text">Editor Review</h5>
{% elif edition_formset %}
<input type=button value="Home" title="Return to manuscript landing page" aria-label="Return to manuscript landing page" onClick="location.href='/manuscript/{{parent_id}}/';">
<input type="submit" name="submit" value="Save" title="Save note changes for this submission of data/code" aria-label="Save note changes for this submission of data/code" onclick="return confirm('This will save the current state of the form, but you will need to return to this page to submit your review.');">
<input type="submit" name="submit_progress_edition" value="Submit and Progress" title="Save note changes for this submission of data/code, and hand off to the curation team" aria-label="Save note changes for this submission of data/code, and hand off to the curation team" onclick="return confirm('Once you hand off this form, editing will be locked. Is this ok?');">
<input type="submit" name="submit_progress_edition" id="submit_progress_edition_button" value="Submit and Progress" title="Save note changes for this submission of data/code, and hand off to the curation team" aria-label="Save note changes for this submission of data/code, and hand off to the curation team" onclick="return confirm('Once you hand off this form, editing will be locked. Is this ok?');">
{% else %}
{% comment %} <input type="submit" name="submit_progress_submission" value="Submit and Progress" onclick="return confirm('Once you hand off this form, editing will be locked. Is this ok?');"> {% endcomment %}
<!-- <input type=button value="Home" onClick="location.href='/manuscript/{{parent_id}}/';"> -->
Expand Down
2 changes: 2 additions & 0 deletions corere/main/templates/main/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/js/bootstrap4-toggle.min.js"></script>

{% comment %} jquery select2 is provided dynamically via the django-select2 library {% endcomment %}
<link href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" rel="stylesheet" />
Expand Down
2 changes: 1 addition & 1 deletion corere/main/templates/main/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
{% register_notify_callbacks callbacks='fill_notification_badge' %} {% comment %} this is disabled during development to not fill up my logs {% endcomment %}
<a class="dropdown-item" href="/notifications" title="View notification list" aria-label="View notification list">Notifications <span class="notification_count badge bg-danger align-middle" >{% live_notify_badge %}</span></a>
<a class="dropdown-item" href="/" title="View manuscripts you are involved with" aria-label="View manuscripts you are involved with">My Manuscripts</a>
<a class="dropdown-item" href="/" title="View manuscripts you are involved with" aria-label="View manuscripts you are involved with">Manuscripts</a>
{% if request.user|has_group:"Role Curator" %}
<a class="dropdown-item" href="/site_actions" title="Additional actions for curating admins" aria-label="Additional actions for curating admins">Site Actions</a>
{% endif%}
Expand Down
Loading

0 comments on commit 9530ebe

Please sign in to comment.