from django.conf.urls import patterns, url
from django.views.generic import TemplateView

urlpatterns = patterns("",
    url(r'^membership-requests/$', 'ocp.work.views.membership_requests', name="membership_requests"),
    url(r'^membership-requests/(?P<state>\w+)/$', 'ocp.work.views.membership_requests', name="membership_requests"),
    url(r'^skill-suggestions/$', 'ocp.work.views.skill_suggestions', name="skill_suggestions"),
    url(r'^my-dashboard/$', 'ocp.work.views.my_dashboard', name="my_dashboard"),
    url(r'^non-process-logging/$', 'ocp.work.views.non_process_logging', name="non_process_logging"),
    url(r'^work-timer/(?P<process_id>\d+)/(?P<commitment_id>\d+)/$', 'ocp.work.views.work_timer', name="work_timer"),
    url(r'^process-logging/(?P<process_id>\d+)/$', 'ocp.work.views.process_logging', name="process_logging"),
    url(r'^work-process-finished/(?P<process_id>\d+)/$', 'ocp.work.views.work_process_finished', name="work_process_finished"),
    url(r'^my-history/$', 'ocp.work.views.my_history', name="my_history"),
    url(r'^work-home/$', 'ocp.work.views.work_home', name="work_home"),
    url(r'^save-timed-work-now/(?P<event_id>\d+)/$', 'ocp.work.views.save_timed_work_now', name="save_timed_work_now"),
    url(r'^change-history-event/(?P<event_id>\d+)/$', 'ocp.work.views.change_history_event', name="change_history_event"),
    url(r'^map/$', 'ocp.work.views.map', name="map"),
    url(r'^project-work/$', 'ocp.work.views.project_work', name="project_work"),
    url(r'^profile/$', 'ocp.work.views.profile', name="profile"),
    url(r'^change-personal-info/(?P<agent_id>\d+)/$', 'ocp.work.views.change_personal_info', name="change_personal_info"),
    url(r'^upload-picture/(?P<agent_id>\d+)/$', 'ocp.work.views.upload_picture', name="upload_picture"),
    url(r'^update-skills/(?P<agent_id>\d+)/$', 'ocp.work.views.update_skills', name="update_skills"),
    url(r"^add-worker-to-location/(?P<location_id>\d+)/(?P<agent_id>\d+)/$", 'ocp.work.views.add_worker_to_location', name="add_worker_to_location"),
    url(r"^add-location-to-worker/(?P<agent_id>\d+)/$", 'ocp.work.views.add_location_to_worker', name="add_location_to_worker"),
    url(r"^manage-faircoin-account/(?P<resource_id>\d+)/$", 'ocp.work.views.manage_faircoin_account', name="manage_faircoin_account"),
    url(r"^transfer-faircoins/(?P<resource_id>\d+)/$", 'ocp.work.views.transfer_faircoins',
        name="transfer_faircoins"),
    url(r"^faircoin-history/(?P<resource_id>\d+)/$", 'ocp.work.views.faircoin_history',
        name="faircoin_history"),
    url(r"^change-faircoin-account/(?P<resource_id>\d+)/$", 'ocp.work.views.change_faircoin_account',
        name="change_faircoin_account"),
    url(r'^membership-discussion/(?P<membership_request_id>\d+)/$', 'ocp.work.views.membership_discussion',
        name="membership_discussion"),
    url(r"^validate-faircoin-address-for-worker/$", 'ocp.work.views.validate_faircoin_address_for_worker', name="validate_faircoin_address_for_worker"),
    url(r"^work-add-todo/$", 'ocp.work.views.work_add_todo', name="work_add_todo"),
    url(r"^work-todo-done/(?P<todo_id>\d+)/$", 'ocp.work.views.work_todo_done', name="work_todo_done"),
    url(r"^work-todo-time/$", 'ocp.work.views.work_todo_time', name="work_todo_time"),
    url(r"^work-todo-description/$", 'ocp.work.views.work_todo_description', name="work_todo_description"),
    url(r"^work-todo-decline/(?P<todo_id>\d+)/$", 'ocp.work.views.work_todo_decline', name="work_todo_decline"),
    url(r"^work-todo-mine/(?P<todo_id>\d+)/$", 'ocp.work.views.work_todo_mine', name="work_todo_mine"),
    url(r"^work-todo-change/(?P<todo_id>\d+)/$", 'ocp.work.views.work_todo_change', name="work_todo_change"),
    url(r"^work-todo-delete/(?P<todo_id>\d+)/$", 'ocp.work.views.work_todo_delete', name="work_todo_delete"),
    url(r"^work-commit-to-task/(?P<commitment_id>\d+)/$", 'ocp.work.views.work_commit_to_task',
        name="work_commit_to_task"),
    url(r"^work-delete-event/(?P<event_id>\d+)/$", 'ocp.work.views.work_delete_event',
        name="work_delete_event"),

    # bum2
    url(r"^your-projects/$", 'ocp.work.views.your_projects', name="your_projects"),
    url(r"^agent/(?P<agent_id>\d+)/$", 'ocp.work.views.members_agent', name="members_agent"),
    url(r"^agent/(?P<agent_id>\d+)/join-requests/$", 'ocp.work.views.join_requests', name="join_requests"),
    #url(r"^agent/(?P<agent_id>\d+)/create-user-agent/$", 'ocp.work.views.create_project_user_and_agent', name="create_project_user_and_agent"),
    url(r'^my-tasks/$', 'ocp.work.views.my_tasks', name="my_tasks"),
    url(r'^take-new-tasks/$', 'ocp.work.views.take_new_tasks', name="take_new_tasks"),
    url(r'^home/$', 'ocp.work.views.my_dashboard', name="home"),
    url(r"^create-your-project/$", 'ocp.work.views.create_your_project', name="create_your_project"),
    url(r"^change-your-project/(?P<agent_id>\d+)/$", 'ocp.work.views.change_your_project', name="change_your_project"),
    url(r'^project-feedback/(?P<agent_id>\d+)/(?P<join_request_id>\d+)/$', 'ocp.work.views.project_feedback',
        name="project_feedback"),
    url(r'^joinaproject/(?P<agent_id>\d+)/(?P<join_request_id>\d+)/$', 'ocp.work.views.project_feedback',
        name="joinaproject"),
    url(r'^agent/(?P<agent_id>\d+)/project_joinform/$', 'ocp.work.views.joinaproject_request_internal',
        name="project_joinform"),
    url(r'^join-project/(?P<project_id>\d+)/$', 'ocp.work.views.join_project',
        name="join_project"),

    url(r'^connect-agent-to-join-request/(?P<agent_id>\d+)/(?P<join_request_id>\d+)/$', 'ocp.work.views.connect_agent_to_join_request',
        name="connect_agent_to_join_request"),
    #url(r'^create-agent-for-join-request/(?P<agent_id>\d+)/(?P<join_request_id>\d+)/$', 'ocp.work.views.create_agent_for_join_request',
    #    name="create_agent_for_join_request"),

    url(r'^accept-request/(?P<join_request_id>\d+)/$', 'ocp.work.views.accept_request',
        name="accept_request"),
    url(r'^decline-request/(?P<join_request_id>\d+)/$', 'ocp.work.views.decline_request',
        name="decline_request"),
    url(r'^undecline-request/(?P<join_request_id>\d+)/$', 'ocp.work.views.undecline_request',
        name="undecline_request"),
    url(r'^delete-request/(?P<join_request_id>\d+)/$', 'ocp.work.views.delete_request',
        name="delete_request"),
    url(r'^create-ocp-acount/(?P<join_request_id>\d+)/$', 'ocp.work.views.create_account_for_join_request',
        name="create_account_for_join_request"),
    url(r"^comments/$", 'ocp.work.views.comments', name="comments"),

    url(r'^share-payment/(?P<agent_id>\d+)/$', 'ocp.work.views.share_payment', name="share_payment"),
    url(r"^validate-nick/$", 'ocp.work.views.validate_nick', name="validate_nick"),
    url(r"^validate-username/$", 'ocp.work.views.validate_username', name="validate_username"),
    url(r'^new-features/$', 'ocp.work.views.new_features', name='new_features'),
    
    url(r"^invoice-number/$", 'ocp.work.views.invoice_number', name="invoice_number"),

)
