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

R9 id card semester select #78

Closed
wants to merge 7 commits into from
Closed

Conversation

dexw25
Copy link
Member

@dexw25 dexw25 commented Jan 24, 2018

Resolves #65
Branch name states R8 but this was planned to be in R9

@dexw25 dexw25 added this to the r9 milestone Jan 24, 2018
index.yaml Outdated
@@ -10,8 +10,46 @@ indexes:
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

- kind: BridgeCrew
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably update the version of index.yaml in the repo or .gitignore it, but I do not think this is the place.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebasing of master (where index.yaml was removed from the repo and added to the .gitignore) should hopefully resolve this.

'members': members,
'semester': semester_mod
# Replace 0 with O because it looks better in the font.
'semester': semester_pretty(semester).replace('0', 'O')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After IRL discussion at today's meeting, disregard.

semesters.py Outdated
# Don't accept anything that does not cast to a float
except ValueError: return None

# Reject semesters that are not in this milennia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?
Also, *millenium.

semesters.py Outdated
if semester > 3000 or semester < 2000:
return None
# Reject semesters that are not Fall or Spring
elif round(semester - int(semester), 1) not in [.1, .2]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the convention for this project is 0.1 and 0.2; correct me if I am wrong.

template_vals = {
'title': 'ID card for ' + member.name,
'members': [member],
'semester': semester_mod
# Replace 0 with O because it looks better in the font
'semester': semester_pretty(semester).replace('0', 'O')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is less lines, the semester_mod (you are welcome to rename the variable if you so desire) line was intentionally separated out to be less confusing to future maintainers of the code (and it avoids having a comment in the middle of a dictionary literal).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After IRL discussion at today's meeting, disregard.

@ZMYaro
Copy link
Member

ZMYaro commented Feb 15, 2018

@derekw023: Do you think you could have an updated version of this by tonight's meeting?

@dexw25
Copy link
Member Author

dexw25 commented Feb 15, 2018

Not for tonight, I have no time. We should probably discuss these and other requested changes at the meeting

@dexw25
Copy link
Member Author

dexw25 commented Mar 27, 2018

Are there any other changes required for this pull request? I don't remember if anything else came up at the meeting

Copy link
Member

@noblelady noblelady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the code looks fine, be sure to rebase off master again so that you can ignore the index.yaml file.

<h3>Select semester for which to generate ID cards:</h3>
<select name="semester" size="{{ semesters|length }}">
{% for semester in semesters %}
<option value={{ semester }}{% if semester == current_semester%} selected="selected"{%endif%}>{{ semester }}</option>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the spacing here consistent (i.e. {% if ... current_semester%}{% if ... current_semester %}; {%endif%}{% endif %})?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, resolved

<h2>Print All ID Cards</h2>
<form action=/cards/all>
<h3>Select semester for which to generate ID cards:</h3>
<select name="semester" size="{{ semesters|length }}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am inclined to say make this a drop-down menu (i.e. no size) since the number of semesters will continue to increase, but people will probably only want to print one semester's ID cards.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, changed

</select>
<br />
<br />
<button type="submit">Print</button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the printer emoji, as used on the member list page, for consistency? (I think it is &#x1f5b6;.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, added

@dexw25 dexw25 force-pushed the r8-id-card-semester-select branch from 5955450 to e4e2922 Compare May 10, 2018 03:17
@dexw25
Copy link
Member Author

dexw25 commented May 10, 2018

Requested changes addressed and rebased to master (index.yaml removed)

@GregoryGhiroli
Copy link

GregoryGhiroli commented May 10, 2018 via email

@dexw25 dexw25 closed this Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ID card generator should be able to generate ID cards from any semester
4 participants