diff --git a/FAIRshakeHub/static/style/base.css b/FAIRshakeHub/static/style/base.css index c703375..9742cf2 100644 --- a/FAIRshakeHub/static/style/base.css +++ b/FAIRshakeHub/static/style/base.css @@ -269,4 +269,89 @@ h1 { transform: rotate(360deg); } } -/* END https://loading.io/css/ */ \ No newline at end of file +/* END https://loading.io/css/ */ + +.table-sticky-header { + background-color: white; + position: relative; + z-index: 0; +} + +.table-sticky-header tr, .table-sticky-header td { + z-index: 0; +} + +.table-sticky-header > thead { + background-color: white; + border: 1px solid #ddd; + position: sticky; + top: 0; + z-index: 3; +} +.table-sticky-header > thead > tr > th { + border-top: 1px solid black; + z-index: 4; +} +.table-sticky-header > thead > tr > th.tbody-thead { + z-index: 4; +} +.table-sticky-header th.tbody-thead { + background-color: white; + border: 1px solid #ddd; + position: sticky; + left: 0; + z-index: 2; + padding: 0 !important; + margin: 0; + display: table-cell; +} +.table-sticky-header th.tbody-thead > div { + display: flex; + justify-items: stretch; + align-items: stretch; +} +.table-sticky-header th.tbody-thead > div > div { + flex: 1 1 0; + min-width: 0; + word-wrap: break-word; + border: 1px solid #ddd; + padding: 0; + margin: 0; +} + +/* +.table { + position: relative; + display: table-column; + flex-direction: column; + border: 1px solid black; +} +.table-thead { + flex: 0 0 auto; + display: flex; +} +.table-tr { + display: flex; + flex-direction: row; +} +.table-thead { + position: sticky; + top: 0; +} +.table-tbody > .table-tr > .table-th { + position: sticky; + left: 0; +} +.table-td, .table-th {} +.table-tbody {} + +table.table-sticky-th thead tr th { + position: -webkit-sticky; + position: sticky; + top: 0; +} +table.table-sticky-th tbody tr th { + position: -webkit-sticky; + position: sticky; + left: 0; +} */ diff --git a/FAIRshakeHub/templates/fairshake/generic/assessments.html b/FAIRshakeHub/templates/fairshake/generic/assessments.html index 25f7d39..4b0afad 100644 --- a/FAIRshakeHub/templates/fairshake/generic/assessments.html +++ b/FAIRshakeHub/templates/fairshake/generic/assessments.html @@ -7,71 +7,75 @@

{{ model|unslugify }} Assessments ({{ items.paginator.count }})

-
-
- - - - - - - +
+
- Assessment - - Metrics -
+ + + + + + + + {% endif %} {% if model != "rubric" %} - + {% endif %} {% if model != "project" %} - + {% endif %} - + {% for metric in metrics %} + - {% for metric in metrics %} - - {% endfor %} - - {% for assessment in items %} - - {% if model != "digital_object" %} - + + + {% for assessment in items %} + + - {% endif %} - {% if model != "rubric" %} - - {% endif %} - {% if model != "project" %} - - {% endif %} - - {% for metric in metrics %} - {% with assessment_pk=assessment.pk|jsonify metric_pk=metric.pk|jsonify %} - {% with assessment_metric=assessment_pk|add:"-"|add:metric_pk %} - {% with answer=answers|return_item:assessment_metric %} - {% if answer %} - - {% else %} - - {% endif %} - {% endwith %} - {% endwith %} - {% endwith %} - {% endfor %} - - {% endfor %} - -
+ Assessment + + Metrics +
{% if model != "digital_object" %} -
+
Target -
+
Rubric -
+
Project -
+
  +
+
+ + {{ metric.title }} + - - {{ metric.title }} - -
+ {% endfor %} +
+ {% if model != "digital_object" %} +
+ + {% endif %} + {% if model != "rubric" %} + + + {% endif %} + {% if model != "project" %} +
{% if assessment.project %} {{ assessment.project.title }} {% endif %} -
+ + {% endif %} +
{{ model|unslugify }} Assessments ({{ items.paginator.coun Details {% endif %} -
- {{ answer.annotate }} ({{ answer.answer }}) - -   -
- {% include "fairshake/generic/page_nav.html" %} -
+
+ + {% for metric in metrics %} + {% with assessment_pk=assessment.pk|jsonify metric_pk=metric.pk|jsonify %} + {% with assessment_metric=assessment_pk|add:"-"|add:metric_pk %} + {% with answer=answers|return_item:assessment_metric %} + {% if answer %} + + {{ answer.annotate }} ({{ answer.answer|stringformat:"0.2f" }}) + + {% else %} + +   + + {% endif %} + {% endwith %} + {% endwith %} + {% endwith %} + {% endfor %} + + {% endfor %} + + + {% include "fairshake/generic/page_nav.html" %} \ No newline at end of file