Example #1
0
    def _delete(self, id):
        c.proposal_type = ProposalType.find_by_id(id)
        meta.Session.delete(c.proposal_type)
        meta.Session.commit()

        h.flash("Proposal type has been deleted.")
        redirect_to("index")
Example #2
0
 def __before__(self, **kwargs):
     c.proposal_types = ProposalType.find_all()
     c.target_audiences = TargetAudience.find_all()
     c.accommodation_assistance_types = AccommodationAssistanceType.find_all()
     c.travel_assistance_types = TravelAssistanceType.find_all()
     c.proposal_event_targets = ProposalEventTarget.find_all()
     log.debug("event target list: %s", c.proposal_event_targets)
Example #3
0
    def new(self):
        # call for miniconfs has closed
        if c.cfmini_status == 'closed':
            return render("proposal/closed_mini.mako")
        elif c.cfmini_status == 'not_open':
            return render("proposal/not_open_mini.mako")

        c.proposal_type = ProposalType.find_by_name('Miniconf')
        c.person = h.signed_in_person()
        h.check_for_incomplete_profile(c.person)

        defaults = {
            'proposal.type': c.proposal_type.id,
            'proposal.technical_requirements': "",
            'proposal.accommodation_assistance': 1,
            'proposal.travel_assistance': 1,
            'proposal.video_release': 0,
            'proposal.slides_release': 0,
            'person.name': c.person.firstname + " " + c.person.lastname,
            'person.mobile': c.person.mobile,
            'person.experience': c.person.experience,
            'person.bio': c.person.bio,
        }

        form = render("proposal/new_mini.mako")
        return htmlfill.render(form, defaults)
Example #4
0
    def edit(self, id):
        c.proposal_type = ProposalType.find_by_id(id)

        defaults = h.object_to_defaults(c.proposal_type, "proposal_type")

        form = render("/proposal_type/edit.mako")
        return htmlfill.render(form, defaults)
Example #5
0
    def new(self):
        # call for miniconfs has closed
        if c.cfmini_status == 'closed':
            return render("proposal/closed_mini.mako")
        elif c.cfmini_status == 'not_open':
            return render("proposal/not_open_mini.mako")

        c.proposal_type = ProposalType.find_by_name('Miniconf')
        c.person = h.signed_in_person()
        h.check_for_incomplete_profile(c.person)

        defaults = {
            'proposal.type': c.proposal_type.id,
            'proposal.technical_requirements': "",
            'proposal.accommodation_assistance': 1,
            'proposal.travel_assistance': 1,
            'proposal.video_release': 0,
            'proposal.slides_release': 0,
            'person.name' : c.person.firstname + " " + c.person.lastname,
            'person.mobile' : c.person.mobile,
            'person.experience' : c.person.experience,
            'person.bio' : c.person.bio,
        }
 
        form = render("proposal/new_mini.mako")
        return htmlfill.render(form, defaults)
Example #6
0
    def edit(self, id):
        c.proposal_type = ProposalType.find_by_id(id)

        defaults = h.object_to_defaults(c.proposal_type, 'proposal_type')

        form = render('/proposal_type/edit.mako')
        return htmlfill.render(form, defaults)
Example #7
0
    def _delete(self, id):
        c.proposal_type = ProposalType.find_by_id(id)
        meta.Session.delete(c.proposal_type)
        meta.Session.commit()

        h.flash("Proposal type has been deleted.")
        redirect_to('index')
Example #8
0
    def index(self):
        c.proposal_type_collection = ProposalType.find_all()

        c.review_collection_by_type = {}
        for proposal_type in c.proposal_type_collection:
            query = Review.by_reviewer(h.signed_in_person().id).join(Proposal).filter_by(proposal_type_id=proposal_type.id)
            c.review_collection_by_type[proposal_type] = query.all()
        return render('/review/list.mako')
Example #9
0
    def latex(self):
        c.proposal_type = ProposalType.find_all()

        for type in c.proposal_type:
            print type

        response.headers['Content-type'] = 'text/plain; charset=utf-8'

        return render('/proposal/latex.mako')
Example #10
0
    def latex(self):
        c.proposal_type = ProposalType.find_all()

        for type in c.proposal_type:
          print type

        response.headers['Content-type']='text/plain; charset=utf-8'

        return render('/proposal/latex.mako')
Example #11
0
    def latex(self):
        c.proposal_type = ProposalType.find_all()

        for type in c.proposal_type:
            print type

        response.headers["Content-type"] = "text/plain; charset=utf-8"

        return render("/proposal/latex.mako")
Example #12
0
    def delete(self, id):
        """Delete the proposal type

        GET will return a form asking for approval.

        POST requests will delete the item.
        """
        c.proposal_type = ProposalType.find_by_id(id)
        return render('/proposal_type/confirm_delete.mako')
Example #13
0
    def delete(self, id):
        """Delete the proposal type

        GET will return a form asking for approval.

        POST requests will delete the item.
        """
        c.proposal_type = ProposalType.find_by_id(id)
        return render("/proposal_type/confirm_delete.mako")
Example #14
0
    def _new(self):
        results = self.form_result['proposal_type']

        c.proposal_type = ProposalType(**results)
        meta.Session.add(c.proposal_type)
        meta.Session.commit()

        h.flash("Proposal type created")
        redirect_to(action='view', id=c.proposal_type.id)
Example #15
0
    def _edit(self, id):
        proposal_type = ProposalType.find_by_id(id)

        for key in self.form_result["proposal_type"]:
            setattr(proposal_type, key, self.form_result["proposal_type"][key])

        # update the objects with the validated form data
        meta.Session.commit()
        h.flash("Proposal type has been updated successfully.")
        redirect_to(action="view", id=id)
Example #16
0
    def _edit(self, id):
        proposal_type = ProposalType.find_by_id(id)

        for key in self.form_result['proposal_type']:
            setattr(proposal_type, key, self.form_result['proposal_type'][key])

        # update the objects with the validated form data
        meta.Session.commit()
        h.flash("Proposal type has been updated successfully.")
        redirect_to(action='view', id=id)
Example #17
0
    def index(self):
        c.proposal_type_collection = ProposalType.find_all()

        c.review_collection_by_type = {}
        for proposal_type in c.proposal_type_collection:
            query = Review.by_reviewer(
                h.signed_in_person()).join(Proposal).filter_by(
                    proposal_type_id=proposal_type.id)
            c.review_collection_by_type[proposal_type] = query.all()
        return render('/review/list.mako')
Example #18
0
 def __before__(self, **kwargs):
     c.proposal_types = ProposalType.find_all()
     c.target_audiences = TargetAudience.find_all()
     c.accommodation_assistance_types = AccommodationAssistanceType.find_all(
     )
     c.travel_assistance_types = TravelAssistanceType.find_all()
Example #19
0
 def index(self):
     c.proposal_type_collection = ProposalType.find_all()
     return render('/proposal_type/list.mako')
Example #20
0
 def __before__(self, **kwargs):
     c.proposal_types = ProposalType.find_all()
     c.target_audiences = TargetAudience.find_all()
     c.accommodation_assistance_types = AccommodationAssistanceType.find_all()
     c.travel_assistance_types = TravelAssistanceType.find_all()
Example #21
0
 def _to_python(self, value, state):
     return ProposalType.find_by_id(value)
Example #22
0
 def view(self, id):
     c.proposal_type = ProposalType.find_by_id(id)
     return render('/proposal_type/view.mako')
Example #23
0
 def index(self):
     c.proposal_type_collection = ProposalType.find_all()
     return render("/proposal_type/list.mako")
Example #24
0
 def _to_python(self, value, state):
     return ProposalType.find_by_id(value)
Example #25
0
 def view(self, id):
     c.proposal_type = ProposalType.find_by_id(id)
     return render("/proposal_type/view.mako")