diff --git a/src/IDF/Views/Project.php b/src/IDF/Views/Project.php index a59d0f6..2befafc 100644 --- a/src/IDF/Views/Project.php +++ b/src/IDF/Views/Project.php @@ -122,6 +122,17 @@ class IDF_Views_Project } /** + * This action serves as URI compatibility layer for v1.0. + * + * @deprecated + */ + public function timelineCompat($request, $match) + { + $match[2] = 'all'; + return $this->timeline($request, $match); + } + + /** * Timeline of the project. */ public $timeline_precond = array('IDF_Precondition::baseAccess'); @@ -179,6 +190,17 @@ class IDF_Views_Project } /** + * This action serves as URI compatibility layer for v1.0. + * + * @deprecated + */ + public function timelineFeedCompat($request, $match) + { + $match[2] = 'all'; + return $this->timelineFeed($request, $match); + } + + /** * Timeline feed. * * A custom view to have a bit more control on the way to handle @@ -192,7 +214,6 @@ class IDF_Views_Project $prj = $request->project; $model_filter = @$match[2]; - $model_filter = @$match[2]; $all_model_filters = self::getAvailableModelFilters(); if (!array_key_exists($model_filter, $all_model_filters)) { $model_filter = 'all'; diff --git a/src/IDF/conf/urls.php b/src/IDF/conf/urls.php index e813413..dccf03b 100644 --- a/src/IDF/conf/urls.php +++ b/src/IDF/conf/urls.php @@ -91,6 +91,23 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/(\w+)/token/(.*)/$#', 'method' => 'timelineFeed', 'name' => 'idf_project_timeline_feed_auth'); +$ctl[] = array('regex' => '#^/p/([\-\w]+)/timeline/$#', + 'base' => $base, + 'model' => 'IDF_Views_Project', + 'method' => 'timelineCompat'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/$#', + 'base' => $base, + 'model' => 'IDF_Views_Project', + 'method' => 'timelineFeedCompat', + 'name' => 'idf_project_timeline_feed'); + +$ctl[] = array('regex' => '#^/p/([\-\w]+)/feed/timeline/token/(.*)/$#', + 'base' => $base, + 'model' => 'IDF_Views_Project', + 'method' => 'timelineFeedCompat', + 'name' => 'idf_project_timeline_feed_auth'); + $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/$#', 'base' => $base, 'model' => 'IDF_Views_Issue', @@ -145,12 +162,12 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/watchlist/(\w+)$#', 'base' => $base, 'model' => 'IDF_Views_Issue', 'method' => 'watchList'); - + $ctl[] = array('regex' => '#^/watchlist/(\w+)$#', 'base' => $base, 'model' => 'IDF_Views_Issue', 'method' => 'forgeWatchList'); - + // ---------- SCM ---------------------------------------- $ctl[] = array('regex' => '#^/p/([\-\w]+)/source/help/$#', diff --git a/src/IDF/templates/idf/project/timeline.html b/src/IDF/templates/idf/project/timeline.html index 9aacd0a..55186ac 100644 --- a/src/IDF/templates/idf/project/timeline.html +++ b/src/IDF/templates/idf/project/timeline.html @@ -13,9 +13,12 @@ {/block} {block context} +

{trans 'All Updates'}

{trans 'Filter by type'}
{foreach $all_model_filters as $filter_key => $filter_name} +{if $filter_key != 'all'} {$filter_name}
+{/if} {/foreach}

{/block}