Skip to content

Commit

Permalink
Merge pull request mozilla-l10n#48 from flodolo/fx10_project
Browse files Browse the repository at this point in the history
Add link to column headers in Projects, fix footer
  • Loading branch information
pascalchevrel committed Nov 3, 2014
2 parents 5072e59 + 1117b8e commit 26bc0ed
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
18 changes: 18 additions & 0 deletions assets/css/webdashboard.css
Expand Up @@ -22,6 +22,19 @@ div#locales {
width: 100%;
}

#colophon .footer-license {
width: 300px;
}

#colophon .footer-nav li {
float: left;
margin-right: 5px;
}

#colophon .footer-nav li.wrap::before {
content: " · ";
}

#main-content table {
text-align: center;
border-collapse: collapse;
Expand All @@ -36,6 +49,11 @@ div#locales {

#main-content table.results td {
padding: 10px 20px;
background-color: #FFF;
}

#main-content table.results th {
padding: 10px 20px;
}

#main-content table.results .results_file {
Expand Down
6 changes: 3 additions & 3 deletions templates/default.php
Expand Up @@ -42,12 +42,12 @@
</div>

<div class="footer-license">
<p>Except where otherwise <a href="http://www.mozilla.org/en-US/about/legal.html#site">noted</a>, content on this site is licensed under the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution Share-Alike License v3.0</a> or any later version.</p>
<p>Portions of this content are ©1998–<?php echo date("Y"); ?> by individual mozilla.org contributors. Content available under a <a href="https://www.mozilla.org/foundation/licensing/website-content/">Creative Commons license</a>.</p>
</div>

<ul class="footer-nav">
<li><a href="/privacy/">Privacy Policy</a></li>
<li><a href="http://mozilla.org/about/legal.html">Legal Notices</a></li>
<li><a href="https://www.mozilla.org/about/privacy/">Privacy</a></li>
<li class="wrap"><a href="https://www.mozilla.org/about/legal/">Legal</a></li>
</ul>
</div>
</footer>
Expand Down
11 changes: 6 additions & 5 deletions views/project.php
Expand Up @@ -4,15 +4,16 @@
$body_class = $body_class . ' project';
$links = '<script language="javascript" type="text/javascript" src="./assets/js/sorttable.js"></script>';
$content = "
<table class=\"table sortable\" id=\"project\">
<table class=\"table\" id=\"project\">
<caption>L10n Project Dashboard ($project)</caption>
<thead>
<tr>
<th>Locale</th>";

// Display columns name
foreach ($pages as $page) {
$content .= '<td>' . $page['file'] . '</td>';
$status_url = LANG_CHECKER . '?locale=all&amp;website=' . $page['site'] . '&amp;file=' . $page['file'];
$content .= '<td><a href="' . $status_url . '" title="Open the status page for this file">' . $page['file'] . '</a></td>';
}
$content .= '
</tr>
Expand Down Expand Up @@ -58,7 +59,7 @@
. '</table>';

// Display stats per page
$content .= '<table class="results sortable">
$content .= '<table class="results">
<thead>
<tr>
<th>Page</th><th>Completion</th>
Expand All @@ -75,8 +76,8 @@
}

// Display global stats
$content .= '<tr><td colspan="2" class="final">Total: ' . count($locale_done) . '/' . $total_locales . ' perfect locales (' . $perfect_locales_coverage . '%)</td></tr>'
. '<tr><td colspan="2">Average: ' . $average_nb_locales . '/' . $total_locales . ' perfect locales (' . $average_coverage . '%)</td></tr>'
$content .= '<tr><th colspan="2" class="final">Total: ' . count($locale_done) . '/' . $total_locales . ' perfect locales (' . $perfect_locales_coverage . '%)</th></tr>'
. '<tr><th colspan="2">Average: ' . $average_nb_locales . '/' . $total_locales . ' perfect locales (' . $average_coverage . '%)</th></tr>'
. '</tbody>'
. '</table>'
. '<p class="table_legend">Percentages between parenthesis express coverage of our l10n base.</p>';
Expand Down

0 comments on commit 26bc0ed

Please sign in to comment.