Permalink
Browse files

Add relative path

  • Loading branch information...
1 parent afbdead commit 909bf3aceecccc5eef987827a14a5e1584138596 @ludofleury ludofleury committed Apr 5, 2012
@@ -170,6 +170,7 @@ public function __toString()
$classTemplate = $this->templateParser->parseFile($this->templatesDirectory . '/class.tpl');
$classTemplate->rootUrl = $this->rootUrl;
+ $classTemplate->relativeRoot = str_repeat('../', substr_count($className, '\\'));
$classTemplate->projectName = $this->projectName;
$classCoverageAvailableTemplates = $classTemplate->classCoverageAvailable;
@@ -5,11 +5,11 @@
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><tpl:projectName /> : code coverage of <tpl:className /></title>
- <link rel="stylesheet" media="screen" type="text/css" href="<tpl:rootUrl />screen.css" title="Screen" />
+ <link rel="stylesheet" media="screen" type="text/css" href="<tpl:relativeRoot />screen.css" title="Screen" />
</head>
<body>
<div id="page">
- <h1><a href="<tpl:rootUrl />"><tpl:projectName /></a> : code coverage of <tpl:className /></h1>
+ <h1><a href="<tpl:relativeRoot />"><tpl:projectName /></a> : code coverage of <tpl:className /></h1>
<div id="content">
<ul class="classSummary">
<li class="class">
@@ -5,7 +5,7 @@
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Code coverage of <tpl:projectName /></title>
- <link rel="stylesheet" media="screen" type="text/css" href="<tpl:rootUrl />screen.css" title="Screen" />
+ <link rel="stylesheet" media="screen" type="text/css" href="screen.css" title="Screen" />
</head>
<body>
<div id="page">
@@ -32,14 +32,14 @@
<li>
<tpl:classCoverageUnavailable>
<div class="bar">
- <div class="label"><a href="<tpl:rootUrl /><tpl:classUrl />"><tpl:className /></a> <span>n/a</span></div>
+ <div class="label"><a href="<tpl:classUrl />"><tpl:className /></a> <span>n/a</span></div>
</div>
</tpl:classCoverageUnavailable>
<tpl:classCoverageAvailable>
<div class="bar">
<div class="background"></div>
<div class="graph" style="width: <tpl:classCoverageValue />%"></div>
- <div class="label"><a href="<tpl:rootUrl /><tpl:classUrl />"><tpl:className /></a> <span><tpl:classCoverageValue />%</span></div>
+ <div class="label"><a href="<tpl:classUrl />"><tpl:className /></a> <span><tpl:classCoverageValue />%</span></div>
</div>
</tpl:classCoverageAvailable>
</li>

0 comments on commit 909bf3a

Please sign in to comment.