-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Merging in survey bugs fixes
Project Listing Page
acmwebsite/controllers/root.py
Outdated
@@ -47,10 +48,11 @@ class RootController(BaseController): | |||
mailinglist = MailingListController() | |||
u = UsersController() | |||
m = MeetingsController() | |||
s = SurveysController() | |||
survey = SurveysController() |
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.
There is code elsewhere that relies on the /s
endpoint.
acmwebsite/controllers/root.py
Outdated
schedule = ScheduleController() | ||
error = ErrorController() | ||
contact = ContactController() | ||
projects = ProjectsController() |
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 controller needs to be renamed. It is getting too confusing. So far, a ThingsController
has been responsible for looking up a thing, not for listing all things. This controller should really be called ProjectListController
.
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.
Revert or fix #61.
#61 needs to be fixed. At the very least it breaks |
@samsartor, no, |
Reverted changes. Deferring to #65.
@@ -26,7 +26,11 @@ def markdown(*args, strip_par=False, **kwargs): | |||
|
|||
|
|||
def icon(icon_name): | |||
return Markup('<i class="glyphicon glyphicon-%s"></i>' % icon_name) | |||
return Markup('<i class="glyphicon glyphicon-{}"></i>'.format(icon_name)) |
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.
Glyphicons are gone in Bootstrap 4... is this ever called anyway?
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.
We use it in acmwebsite/templates/survey_results.xhtml
to display the up and down arrows on the survey results page. We can easily replace those though. Added a note on #67 about this.
acmwebsite/public/js/mailinglist.js
Outdated
}); | ||
$('#mailinglist-form').submit(function() { | ||
$(this).find("button[type='submit']").prop('disabled',true); | ||
}); |
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.
Why did we make changes to this file?
acmwebsite/public/js/site.js
Outdated
$('input[name="first_time"]').change(function() { | ||
checked = this.checked; | ||
$('.on-first-time').each(function() { | ||
if (checked) { $(this).fadeIn() } else { $(this).fadeOut() } |
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.
Same here... not sure how this is related to your PR.
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.
Let's stick to 4 spaces for indentation on all code, two spaces on markup. Seems more consistent than this silly 2-space JavaScript thing.
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've updated the code. However, you can't just go around changing the contributing guidelines on a whim like this again. It is no longer just you, Sam, and me on the project.
In the future, please inform all contributors (by email or some other method) before changing the contributing guidelines so that we can all be on the same page.
|
||
def downgrade(): | ||
op.drop_table('team') | ||
op.drop_table('projects') |
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.
Make sure the migrations work... I have not tested as a part of my review.
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.
Migration tested. It does work.
acmwebsite/controllers/project.py
Outdated
|
||
@expose('acmwebsite.templates.projects') | ||
def index(self): | ||
return dict(page='projects', projects=DBSession.query(Project).all()) |
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.
No need to .all()
here I think... you are just iterating over it once it looks like.
acmwebsite/controllers/project.py
Outdated
|
||
|
||
class ProjectsController(BaseController): | ||
"""Root controller for listing all projects""" |
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.
"Root controller"?
acmwebsite/model/__init__.py
Outdated
@@ -62,6 +62,20 @@ def init_model(engine): | |||
from acmwebsite.model.meeting import Meeting | |||
from acmwebsite.model.mailmessage import MailMessage | |||
from acmwebsite.model.survey import Survey, SurveyField, SurveyResponse, SurveyData | |||
from acmwebsite.model.project import Project, team_table |
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.
Why is team_table
exposed?
Yes, this is fine... in the future please try and keep pull request topics separate... for example, changing style of code in separate request. |
Included in this PR is my work on the project page as well as work done by Liam and David on the low hanging fruit issues.