diff --git a/src/IDF/conf/idf.php-dist b/src/IDF/conf/idf.php-dist index 2e7db9a..46b2614 100644 --- a/src/IDF/conf/idf.php-dist +++ b/src/IDF/conf/idf.php-dist @@ -150,7 +150,7 @@ $cfg['middleware_classes'] = array( 'Pluf_Middleware_Translation', ); $cfg['template_context_processors'] = array('IDF_Middleware_ContextPreProcessor'); -$cfg['idf_views'] = dirname(__FILE__).'/views.php'; +$cfg['idf_views'] = dirname(__FILE__).'/urls.php'; $cfg['template_tags'] = array( 'hotkey' => 'IDF_Template_HotKey', 'issuetext' => 'IDF_Template_IssueComment', diff --git a/src/IDF/conf/urls.php b/src/IDF/conf/urls.php new file mode 100644 index 0000000..52fd269 --- /dev/null +++ b/src/IDF/conf/urls.php @@ -0,0 +1,275 @@ + '#^/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'index'); + +$ctl[] = array('regex' => '#^/login/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'login', + 'name' => 'login_view'); + +$ctl[] = array('regex' => '#^/preferences/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_User', + 'method' => 'myAccount'); + +$ctl[] = array('regex' => '#^/u/(.*)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_User', + 'method' => 'view'); + +$ctl[] = array('regex' => '#^/register/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'register'); + +$ctl[] = array('regex' => '#^/register/k/(.*)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'registerConfirmation'); + +$ctl[] = array('regex' => '#^/register/ik/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'registerInputKey'); + +$ctl[] = array('regex' => '#^/logout/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'logout'); + +$ctl[] = array('regex' => '#^/help/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views', + 'method' => 'faq'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'home'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/timeline/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'timeline'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'index'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/search/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'search'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(\d+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'view'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(\d+)/star/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'star'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/status/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'listStatus'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/label/(\d+)/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'listLabel'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/create/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'create'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/my/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'myIssues'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/attachment/(\d+)/(.*)$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Issue', + 'method' => 'getAttachment'); + +// ---------- SCM ---------------------------------------- + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source', + 'method' => 'treeBase'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/(\w+)/(.*)$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source', + 'method' => 'tree'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changes/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source', + 'method' => 'changeLog'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/commit/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source', + 'method' => 'commit'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/download/(\w+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source', + 'method' => 'download'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/file/(\w+)/(.*)$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source', + 'method' => 'getFile'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/treerev/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source_Svn', + 'method' => 'treeRev'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changesrev/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Source_Svn', + 'method' => 'changelogRev'); + +// ---------- Downloads ------------------------------------ + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Download', + 'method' => 'index'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/label/(\d+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Download', + 'method' => 'listLabel'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Download', + 'method' => 'view'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/get/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Download', + 'method' => 'download'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/create/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Download', + 'method' => 'submit'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/delete/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Download', + 'method' => 'delete'); + + +// ---------- ADMIN -------------------------------------- + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'admin'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/issues/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'adminIssues'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/downloads/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'adminDownloads'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/source/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'adminSource'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/members/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'adminMembers'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/tabs/$#', + 'base' => $base, + 'priority' => 4, + 'model' => 'IDF_Views_Project', + 'method' => 'adminTabs'); + +return $ctl; diff --git a/src/IDF/conf/views.php b/src/IDF/conf/views.php deleted file mode 100644 index 52fd269..0000000 --- a/src/IDF/conf/views.php +++ /dev/null @@ -1,275 +0,0 @@ - '#^/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'index'); - -$ctl[] = array('regex' => '#^/login/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'login', - 'name' => 'login_view'); - -$ctl[] = array('regex' => '#^/preferences/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_User', - 'method' => 'myAccount'); - -$ctl[] = array('regex' => '#^/u/(.*)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_User', - 'method' => 'view'); - -$ctl[] = array('regex' => '#^/register/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'register'); - -$ctl[] = array('regex' => '#^/register/k/(.*)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'registerConfirmation'); - -$ctl[] = array('regex' => '#^/register/ik/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'registerInputKey'); - -$ctl[] = array('regex' => '#^/logout/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'logout'); - -$ctl[] = array('regex' => '#^/help/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views', - 'method' => 'faq'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'home'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/timeline/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'timeline'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'index'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/search/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'search'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(\d+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'view'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(\d+)/star/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'star'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/status/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'listStatus'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/label/(\d+)/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'listLabel'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/create/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'create'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/my/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'myIssues'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/attachment/(\d+)/(.*)$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Issue', - 'method' => 'getAttachment'); - -// ---------- SCM ---------------------------------------- - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source', - 'method' => 'treeBase'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/tree/(\w+)/(.*)$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source', - 'method' => 'tree'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changes/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source', - 'method' => 'changeLog'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/commit/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source', - 'method' => 'commit'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/download/(\w+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source', - 'method' => 'download'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/file/(\w+)/(.*)$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source', - 'method' => 'getFile'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/treerev/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source_Svn', - 'method' => 'treeRev'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changesrev/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Source_Svn', - 'method' => 'changelogRev'); - -// ---------- Downloads ------------------------------------ - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Download', - 'method' => 'index'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/label/(\d+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Download', - 'method' => 'listLabel'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Download', - 'method' => 'view'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/get/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Download', - 'method' => 'download'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/create/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Download', - 'method' => 'submit'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/delete/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Download', - 'method' => 'delete'); - - -// ---------- ADMIN -------------------------------------- - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'admin'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/issues/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'adminIssues'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/downloads/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'adminDownloads'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/source/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'adminSource'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/members/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'adminMembers'); - -$ctl[] = array('regex' => '#^/p/([\-\w]+)/admin/tabs/$#', - 'base' => $base, - 'priority' => 4, - 'model' => 'IDF_Views_Project', - 'method' => 'adminTabs'); - -return $ctl;