continued :)
[phpgitweb.git] / htdocs / pages / summary.class.php
index 30838e125e0c08d6876ea3571a3e260bbb5716f3..0e3eae63ff62a39c88482c0da6f84f306bfef04a 100644 (file)
@@ -24,16 +24,33 @@ class page_summary {
     public function main($phpgitweb, $project) {
                $this->phpgitweb = $phpgitweb;
                if(!$project)
-                       return;
+                       return new ContentProvider('main', 'err400');
                $project['refs'] = $phpgitweb->get_project_loader()->getProjectRefs($project);
+               $phpgitweb->append_header_nav("summary", null, true);
+               $phpgitweb->append_title("summary");
                
                $this->page = new ContentProvider('summary', 'main');
                
                $this->page->set('description', htmlentities($project['description']));
                $this->page->set('owner', htmlentities($project['owner']));
                
+               $giturls = GitConfig::$GIT_BASE_URL;
+               $urlfield = "";
+               foreach($giturls as $url) {
+                       if($urlfield != "")
+                               $urlfield .= "<br \>";
+                       $urlfield .= $url.(substr($url, -1) == '/' ? '' : '/').$project['name'];
+               }
+               if($urlfield != "")
+                       $this->page->set('giturl', new ContentProvider('summary', 'giturl', array('git_link' => $urlfield)));
+               else
+                       $this->page->set('giturl', '');
+               
                $shortlog = new shortlog();
                $this->page->set('shortlog', $shortlog->generate_shortlog($project, null, 16, 0, null, false));
+               $first_commit = $shortlog->get_first_commit();
+               
+               $this->page->set('last_change', gmdate('r', $first_commit['committer_time']));
                
                return $this->page;
        }