예제 #1
0
def project_personnel_select(filename=None, node_id=None):
    form = ResponsiblePartySelectForm(filename=filename)

    # Process POST
    if request.method == 'POST':
        form_value = request.form
        form_dict = form_value.to_dict(flat=False)
        url = select_post(filename,
                          form,
                          form_dict,
                          'POST',
                          PAGE_PROJECT_PERSONNEL_SELECT,
                          PAGE_PROJECT,
                          PAGE_PROJECT,
                          PAGE_PROJECT_PERSONNEL,
                          project_node_id=node_id)
        return redirect(url)

    # Process GET
    help = [get_help('project_personnel')]
    return rp_select_get(filename=filename,
                         form=form,
                         rp_name='personnel',
                         rp_singular=non_breaking('Project Personnel'),
                         rp_plural=non_breaking('Project Personnel'),
                         node_id=node_id,
                         help=help)
예제 #2
0
def contact_select(filename=None):
    form = ResponsiblePartySelectForm(filename=filename)

    # Process POST
    if request.method == 'POST':
        form_value = request.form
        form_dict = form_value.to_dict(flat=False)
        url = select_post(filename, form, form_dict,
                          'POST', PAGE_CONTACT_SELECT, PAGE_CREATOR_SELECT,
                          PAGE_ASSOCIATED_PARTY_SELECT, PAGE_CONTACT)
        return redirect(url)

    # Process GET
    set_current_page('contact')
    help = [get_help('contacts')]
    return rp_select_get(filename=filename, form=form, rp_name='contact',
                         rp_singular='Contact', rp_plural='Contacts', help=help)
예제 #3
0
def creator_select(filename=None):
    form = ResponsiblePartySelectForm(filename=filename)

    # Process POST
    if request.method == 'POST':
        form_value = request.form
        form_dict = form_value.to_dict(flat=False)
        url = select_post(filename, form, form_dict,
                          'POST', PAGE_CREATOR_SELECT, PAGE_TITLE,
                          PAGE_CONTACT_SELECT, PAGE_CREATOR)
        return redirect(url)

    # Process GET
    set_current_page('creator')
    help = [get_help('creators')]
    return rp_select_get(filename=filename, form=form, rp_name=names.CREATOR,
                         rp_singular='Creator', rp_plural='Creators', help=help)
예제 #4
0
def metadata_provider_select(filename=None):
    form = ResponsiblePartySelectForm(filename=filename)

    # Process POST
    if request.method == 'POST':
        form_value = request.form
        form_dict = form_value.to_dict(flat=False)
        url = select_post(filename, form, form_dict,
                          'POST', PAGE_METADATA_PROVIDER_SELECT,
                          PAGE_ASSOCIATED_PARTY_SELECT, PAGE_ABSTRACT,
                          PAGE_METADATA_PROVIDER)
        return redirect(url)

    # Process GET
    set_current_page('metadata_provider')
    help = [get_help('metadata_providers')]
    return rp_select_get(filename=filename, form=form,
                         rp_name=names.METADATAPROVIDER,
                         rp_singular=non_breaking('Metadata Provider'),
                         rp_plural=non_breaking('Metadata Providers'), help=help)
예제 #5
0
def associated_party_select(filename=None):
    form = ResponsiblePartySelectForm(filename=filename)

    # Process POST
    if request.method == 'POST':
        form_value = request.form
        form_dict = form_value.to_dict(flat=False)
        url = select_post(filename, form, form_dict,
                          'POST', PAGE_ASSOCIATED_PARTY_SELECT,
                          PAGE_CONTACT_SELECT,
                          PAGE_METADATA_PROVIDER_SELECT,
                          PAGE_ASSOCIATED_PARTY)
        return redirect(url)

    # Process GET
    set_current_page('associated_party')
    help = [get_help('associated_parties')]
    return rp_select_get(filename=filename, form=form,
                         rp_name=names.ASSOCIATEDPARTY,
                         rp_singular=non_breaking('Associated Party'),
                         rp_plural=non_breaking('Associated Parties'), help=help)