Permalink
Browse files

Provide a way to go back to search from onestring view

  • Loading branch information...
flodolo committed Nov 10, 2015
1 parent e2fceec commit b4ae1a9499334885259e8ed65da764a2717f5a9a
Showing with 14 additions and 0 deletions.
  1. +4 −0 app/views/onestring.php
  2. +10 −0 web/style/transvision.css
View
@@ -23,13 +23,17 @@
<tr>
<th>Locale</th>
<th>Translation</th>
<th>&nbsp;</th>
</tr>
<?php
$reference_locale = Project::getReferenceLocale($repo);
foreach ($translations as $locale => $translation) {
$rtl_support = RTLSupport::isRTL($locale) ? 'dir="rtl"' : '';
$search_link = "/?sourcelocale={$reference_locale}&locale={$locale}&repo={$repo}&search_type=entities&recherche={$entity}&perfect_match=perfect_match";
echo "<tr id='{$locale}''>\n" .
" <th><a href='#{$locale}'>{$locale}</a></th>\n" .
" <td lang='#{$locale}' {$rtl_support} >" . Utils::secureText($translation) . "</td>\n" .
" <td><a class='onestring_search' href='{$search_link}' title='Search for the entity in this locale'>🔍</a></td>\n" .
"</tr>\n";
}
?>
View
@@ -267,6 +267,16 @@ td {
display: none;
}
td a.onestring_search {
display: block;
margin: 0 auto;
padding: 0 4px;
}
td a.onestring_search:hover {
text-decoration: none;
}
td a em,
td em.error {
font-style: normal;

0 comments on commit b4ae1a9

Please sign in to comment.