app/soc/logic/site/map.py
changeset 372 8595c1129c74
parent 350 e8f14fde7f0e
child 377 d94ec6f104cc
equal deleted inserted replaced
371:6dad90b78770 372:8595c1129c74
   103   'Site: Settings',
   103   'Site: Settings',
   104   short_name='Site Settings',
   104   short_name='Site Settings',
   105   parent=home)
   105   parent=home)
   106 
   106 
   107 # Site User Profile views
   107 # Site User Profile views
   108 site_user_sub_menu = page.Page(
   108 site_user_sub_menu = page.NonPage(
   109   page.Url(
   109   'site-user-sub-menu',
   110     # not a real Django URL regex, just a unique placeholder
   110   'Site: Users Sub-Menu',
   111     # (this can be any unique string that re.compile() will not reject, but
       
   112     # that also contains characters that would be escaped, causing
       
   113     # soc.logic.site.page.Page.makeLinkUrl() to reject it and not make the
       
   114     # menu item into an <A HREF> link; this seems a bit hacky...)
       
   115     #
       
   116     # TODO(tlarsen): formalize this hack by subclassing Page (maybe calling
       
   117     #   it something like NonPage) to add a non-linkable form of page for
       
   118     #   use in dividers just like this
       
   119     # TODO(tlarsen): add an optional keyword parameter that can be used to
       
   120     #   control where the collapsible sub-menus are and whether they are
       
   121     #   collapsed or not by default in the sidebar menu 
       
   122     'site*user*sub*menu',
       
   123     # no view, since this is just a link-less menu divider
       
   124     # (this page will not be placed in urlpatterns)
       
   125     None,
       
   126     # name is alternate string for view when it is not unique
       
   127     name='site-user-sub-menu'),
       
   128   '',
       
   129   short_name='Site Users',
   111   short_name='Site Users',
   130   parent=site_settings_edit)
   112   parent=site_settings_edit)
   131 
   113 
   132 site_user_lookup = page.Page(
   114 site_user_lookup = page.Page(
   133   page.Url(
   115   page.Url(
   168     'soc.views.docs.show.public'),
   150     'soc.views.docs.show.public'),
   169   'Show Document',
   151   'Show Document',
   170   parent=home)
   152   parent=home)
   171  
   153  
   172 # Site Document views
   154 # Site Document views
   173 site_docs_sub_menu = page.Page(
   155 site_docs_sub_menu = page.NonPage(
   174   page.Url(
   156   'site-docs-sub-menu',
   175     # (see site_user_sub_menu above for how this works...) 
   157   'Site: Documents Sub-Menu',
   176     'site*docs*sub*menu',
       
   177     # no view, since this is just a link-less menu divider
       
   178     None,
       
   179     # name is alternate string for view when it is not unique
       
   180     name='site-docs-sub-menu'),
       
   181   '',
       
   182   short_name='Site Documents',
   158   short_name='Site Documents',
   183   parent=site_settings_edit)
   159   parent=site_settings_edit)
   184 
   160 
   185 site_docs_create = page.Page(
   161 site_docs_create = page.Page(
   186   page.Url(
   162   page.Url(
   217 # Sponsor Group public view
   193 # Sponsor Group public view
   218 sponsor_profile = page.Page(
   194 sponsor_profile = page.Page(
   219   page.Url(
   195   page.Url(
   220     r'^sponsor/profile/%s' % path_link_name.LINKNAME_ARG_PATTERN,
   196     r'^sponsor/profile/%s' % path_link_name.LINKNAME_ARG_PATTERN,
   221     'soc.views.sponsor.profile.public'),
   197     'soc.views.sponsor.profile.public'),
   222   'Public Profile',
   198   'Sponsor Public Profile',
   223   parent=home)
   199   parent=home)
   224     
   200     
   225 # Sponsor Group Site views
   201 # Sponsor Group Site views
   226 site_sponsor_sub_menu = page.Page(
   202 site_sponsor_sub_menu = page.NonPage(
   227   page.Url(
   203   'site-sponsor-sub-menu',
   228     # (see site_user_sub_menu above for how this works...) 
   204   'Site: Sponsors Sub-Menu',
   229     'site*sponsor*sub*menu',
       
   230     # no view, since this is just a link-less menu divider
       
   231     None,
       
   232     # name is alternate string for view when it is not unique
       
   233     name='site-sponsor-sub-menu'),
       
   234   '',
       
   235   short_name='Site Sponsors',
   205   short_name='Site Sponsors',
   236   parent=site_settings_edit)
   206   parent=site_settings_edit)
   237 
   207 
   238 site_sponsor_create = page.Page(
   208 site_sponsor_create = page.Page(
   239   page.Url(
   209   page.Url(