-
-
Notifications
You must be signed in to change notification settings - Fork 77
[WIP] CLDT seat implementation #2689
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
base: develop
Are you sure you want to change the base?
Changes from 6 commits
b00cd6c
5eb218a
a0ec5a7
37303cd
bc7c4b3
4665d17
31a6b92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,8 @@ | |
| <th>Variant</th> | ||
| <th>Dates</th> | ||
| <th>Contribution</th> | ||
| <th>Remaining instructor training seats</th> | ||
| <th>IT seats</th> | ||
| <th>CLDT seats</th> | ||
| <th class="additional-links"></th> | ||
| </tr> | ||
| {% for membership in all_memberships %} | ||
|
|
@@ -41,7 +42,10 @@ | |
| <td>{{ membership.agreement_start|date:"Y-m-d" }} — {{ membership.agreement_end|date:"Y-m-d" }}</td> | ||
| <td>{{ membership.get_contribution_type_display }}</td> | ||
| <td {% if membership.instructor_training_seats_remaining <= 0 and membership.instructor_training_seats_total > 0 or membership.instructor_training_seats_remaining < 0 and membership.instructor_training_seats_total == 0 %}class="table-danger"{% endif %}> | ||
| {{ membership.instructor_training_seats_remaining }} | ||
| {{ membership.instructor_training_seats_remaining }} / {{ membership.instructor_training_seats_total }} | ||
| </td> | ||
| <td {% if membership._cldt_seats_remaining <= 0 and membership._cldt_seats_total > 0 or membership._cldt_seats_remaining < 0 and membership._cldt_seats_total == 0 %}class="table-danger"{% endif %}> | ||
| {{ membership._cldt_seats_remaining }} / {{ membership._cldt_seats_total }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Django template also complains here, so I suggest applying these changes in the lines above:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
| </td> | ||
| <td> | ||
| <a href="{% url 'membership_details' membership.pk %}" title="View membership"><i class="fas fa-info-circle"></i></a> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| <th rowspan="2">Agreement</th> | ||
| <th rowspan="2">Contribution</th> | ||
| <th colspan="3" class="text-center">Instructor training seats (combined public and in-house)</th> | ||
| <th colspan="3" class="text-center">CLDT seats</th> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
| <th rowspan="2" class="additional-links"></th> | ||
| </tr> | ||
| <tr> | ||
|
|
@@ -35,6 +36,9 @@ | |
| <td>{{ result.instructor_training_seats_total }}</td> | ||
| <td>{{ result.instructor_training_seats_utilized }}</td> | ||
| <td>{{ result.instructor_training_seats_remaining }}</td> | ||
| <td>{{ result._cldt_training_seats_total }}</td> | ||
| <td>{{ result._cldt_training_seats_utilized }}</td> | ||
| <td>{{ result._cldt_training_seats_remaining }}</td> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Django template is complaining about these names. Apparently they can't start with
Changes should be applied here and in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've changed the CLDT annotation variable names but not the others. We can do this after merge/rebase?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think only CLDT annotations started with |
||
| <td> | ||
| <a href="{% url 'membership_details' result.pk %}" title="View membership"><i class="fas fa-info-circle"></i></a> | ||
| </td> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Generated by Django 4.2.13 on 2024-08-21 10:32 | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("workshops", "0270_alter_organization_affiliated_organizations"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="event", | ||
| name="open_CLDT_applications", | ||
| field=models.BooleanField( | ||
| blank=True, | ||
| default=False, | ||
| help_text="If this event is <b>CLDT</b>, you can mark it as 'open applications' which means that people not associated with this event's member sites can also take part in this event.", | ||
| verbose_name="CLDT Open applications", | ||
| ), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="membership", | ||
| name="additional_cldt_seats", | ||
| field=models.PositiveIntegerField( | ||
| default=0, | ||
| help_text="Use this field if you want to grant more CLDT seats than the agreement provides for.", | ||
| verbose_name="Additional CLDT seats", | ||
| ), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="membership", | ||
| name="cldt_seats", | ||
| field=models.PositiveIntegerField( | ||
| default=0, | ||
| help_text="Number of CLDT seats", | ||
| verbose_name="Collaborative Lesson Development Training seats", | ||
| ), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="membership", | ||
| name="cldt_seats_rolled_from_previous", | ||
| field=models.PositiveIntegerField( | ||
| blank=True, | ||
| help_text="CLDT seats rolled over from previous membership.", | ||
| null=True, | ||
| ), | ||
| ), | ||
| migrations.AddField( | ||
| model_name="membership", | ||
| name="cldt_seats_rolled_over", | ||
| field=models.PositiveIntegerField( | ||
| blank=True, | ||
| help_text="CLDT seats rolled over into next membership.", | ||
| null=True, | ||
| ), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name="membership", | ||
| name="public_status", | ||
| field=models.CharField( | ||
| choices=[("public", "Public"), ("private", "Private")], | ||
| default="private", | ||
| help_text="Public memberships may be listed on any of The Carpentries websites.", | ||
| max_length=20, | ||
| verbose_name="Can this membership be publicized on The Carpentries websites?", | ||
| ), | ||
| ), | ||
| ] |

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This notation (
remaining count/total count) is clever, but I'm wondering if users would know this is remaining / total, and not utilized / total.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check this with the CT, but as these calculations have been in place for the other seat types, I wouldn't want to change it without consulting them.