app/soc/logic/site/map.py
changeset 425 95058c81a065
parent 409 9d24850db88f
child 430 e7605c7753b1
equal deleted inserted replaced
424:9bc6fae7d904 425:95058c81a065
    45     }),
    45     }),
    46   'Google Open Source Programs',
    46   'Google Open Source Programs',
    47   # it should be obvious that every page comes from the home page
    47   # it should be obvious that every page comes from the home page
    48   in_breadcrumb=False)
    48   in_breadcrumb=False)
    49 
    49 
       
    50 # User sub-menu, changes depending on if User is signed-in or not
       
    51 user_signin_sub_menu = page.NonPage(
       
    52   'user-sign-in-sub-menu',
       
    53   'User',
       
    54   parent=home)
       
    55 
       
    56 user_signout_sub_menu = page.NonPage(
       
    57   'user-sign-out-sub-menu',
       
    58   'User',
       
    59   parent=home)
       
    60 
    50 # User authentication view placeholders
    61 # User authentication view placeholders
    51 # (these are not real Django views, but need to appear in menus, etc.)
    62 # (these are not real Django views, but need to appear in menus, etc.)
    52 user_signin = page.Page(
    63 user_signin = page.Page(
    53   page.Url(
    64   page.Url(
    54     # not a real Django URL regex, just a unique placeholder
    65     # not a real Django URL regex, just a unique placeholder
    58     None,
    69     None,
    59     # name is alternate string for view when it is not unique
    70     # name is alternate string for view when it is not unique
    60     name='user-sign-in'),
    71     name='user-sign-in'),
    61   'User (sign in)',
    72   'User (sign in)',
    62   link_url=users.create_login_url('/'),
    73   link_url=users.create_login_url('/'),
    63   parent=home)
    74   parent=user_signin_sub_menu)
    64 
    75 
    65 user_signout = page.Page(
    76 user_signout = page.Page(
    66   page.Url(
    77   page.Url(
    67     # not a real Django URL regex, just a unique placeholder
    78     # not a real Django URL regex, just a unique placeholder
    68     users.create_logout_url('/'),
    79     users.create_logout_url('/'),
    71     None,
    82     None,
    72     # name is alternate string for view when it is not unique
    83     # name is alternate string for view when it is not unique
    73     name='user-sign-out'),
    84     name='user-sign-out'),
    74   'User (sign out)',
    85   'User (sign out)',
    75   link_url=users.create_logout_url('/'),
    86   link_url=users.create_logout_url('/'),
    76   parent=home)
    87   parent=user_signout_sub_menu)
    77 
    88 
    78 # User Profile views
    89 # User Profile views
    79 user_create = page.Page(
    90 user_create = page.Page(
    80   page.Url(
    91   page.Url(
    81     r'^user/profile$',
    92     r'^user/profile$',
    82     'soc.views.user.profile.create'),
    93     'soc.views.user.profile.create'),
    83   'User: Create a New Profile',
    94   'User: Create a New Profile',
    84   short_name='Site-wide User Profile',
    95   short_name='Site-wide User Profile',
    85   parent=user_signout)
    96   parent=user_signout_sub_menu)
    86 
    97 
    87 user_edit = page.Page(
    98 user_edit = page.Page(
    88   page.Url(
    99   page.Url(
    89     r'^user/profile/%s$' % path_link_name.LINKNAME_ARG_PATTERN,
   100     r'^user/profile/%s$' % path_link_name.LINKNAME_ARG_PATTERN,
    90     'soc.views.user.profile.edit'),
   101     'soc.views.user.profile.edit'),
   103     }),
   114     }),
   104   'Google Open Source Programs',
   115   'Google Open Source Programs',
   105   # it should be obvious that every page comes from the home page
   116   # it should be obvious that every page comes from the home page
   106   in_breadcrumb=False)
   117   in_breadcrumb=False)
   107 
   118 
       
   119 site_sub_menu = page.NonPage(
       
   120   'site-sub-menu',
       
   121   'Site',
       
   122   parent=home)
       
   123 
       
   124 # Site User Profile views
   108 site_settings_edit = page.Page(
   125 site_settings_edit = page.Page(
   109   page.Url(
   126   page.Url(
   110     r'^site/settings/edit$',
   127     r'^site/settings/edit$',
   111     'soc.views.site.settings.edit',
   128     'soc.views.site.settings.edit',
   112     kwargs={
   129     kwargs={
   113       'path': models.site_settings.logic.DEF_SITE_SETTINGS_PATH,
   130       'path': models.site_settings.logic.DEF_SITE_SETTINGS_PATH,
   114       'logic': models.site_settings.logic,
   131       'logic': models.site_settings.logic,
   115     }),
   132     }),
   116   'Site: Settings',
   133   'Site: Settings',
   117   short_name='Site Settings',
   134   short_name='Site Settings',
   118   parent=home)
   135   parent=site_sub_menu)
   119 
   136 
   120 # Site User Profile views
   137 # Site User Profile views
   121 site_user_sub_menu = page.NonPage(
   138 site_user_sub_menu = page.NonPage(
   122   'site-user-sub-menu',
   139   'site-user-sub-menu',
   123   'Site: Users Sub-Menu',
   140   'Site: Users Sub-Menu',
   124   short_name='Site Users',
   141   short_name='Site Users',
   125   parent=site_settings_edit)
   142   parent=site_sub_menu)
   126 
   143 
   127 site_user_lookup = page.Page(
   144 site_user_lookup = page.Page(
   128   page.Url(
   145   page.Url(
   129     r'^site/user/lookup$',
   146     r'^site/user/lookup$',
   130     'soc.views.site.user.profile.lookup'),
   147     'soc.views.site.user.profile.lookup'),
   167 # Site Document views
   184 # Site Document views
   168 site_docs_sub_menu = page.NonPage(
   185 site_docs_sub_menu = page.NonPage(
   169   'site-docs-sub-menu',
   186   'site-docs-sub-menu',
   170   'Site: Documents Sub-Menu',
   187   'Site: Documents Sub-Menu',
   171   short_name='Site Documents',
   188   short_name='Site Documents',
   172   parent=site_settings_edit)
   189   parent=site_sub_menu)
   173 
   190 
   174 site_docs_create = page.Page(
   191 site_docs_create = page.Page(
   175   page.Url(
   192   page.Url(
   176     r'^docs/edit$',
   193     r'^docs/edit$',
   177     'soc.views.models.docs.create'),
   194     'soc.views.models.docs.create'),
   214 # Sponsor Group Site views
   231 # Sponsor Group Site views
   215 site_sponsor_sub_menu = page.NonPage(
   232 site_sponsor_sub_menu = page.NonPage(
   216   'site-sponsor-sub-menu',
   233   'site-sponsor-sub-menu',
   217   'Site: Sponsors Sub-Menu',
   234   'Site: Sponsors Sub-Menu',
   218   short_name='Site Sponsors',
   235   short_name='Site Sponsors',
   219   parent=site_settings_edit)
   236   parent=site_sub_menu)
   220 
   237 
   221 site_sponsor_create = page.Page(
   238 site_sponsor_create = page.Page(
   222   page.Url(
   239   page.Url(
   223     r'^site/sponsor/profile$',
   240     r'^site/sponsor/profile$',
   224     'soc.views.models.sponsor.create'),
   241     'soc.views.models.sponsor.create'),
   262 # Host Site views
   279 # Host Site views
   263 site_host_sub_menu = page.NonPage(
   280 site_host_sub_menu = page.NonPage(
   264   'site-host-sub-menu',
   281   'site-host-sub-menu',
   265   'Site: Host Sub-Menu',
   282   'Site: Host Sub-Menu',
   266   short_name='Site Hosts',
   283   short_name='Site Hosts',
   267   parent=site_settings_edit)
   284   parent=site_sub_menu)
   268 
   285 
   269 site_host_create = page.Page(
   286 site_host_create = page.Page(
   270   page.Url(
   287   page.Url(
   271     r'^site/host/profile$',
   288     r'^site/host/profile$',
   272     'soc.views.models.host.create'),
   289     'soc.views.models.host.create'),