| 1 | #set ($title = "Unicorn - Translations") |
|---|
| 2 | #set ($css = ['base_ucn-yc.css']) |
|---|
| 3 | #set ($js = ['mootools-1.2.3-core+more-yc.js', 'w3c_unicorn_languages-yc.js']) |
|---|
| 4 | #parse('head.vm') |
|---|
| 5 | |
|---|
| 6 | #if ($messages) |
|---|
| 7 | #displayMessages($messages) |
|---|
| 8 | #end |
|---|
| 9 | |
|---|
| 10 | <div id="translations"> |
|---|
| 11 | <form method="post" action="./translations"> |
|---|
| 12 | |
|---|
| 13 | <fieldset class="about_you"> |
|---|
| 14 | <legend>About you</legend> |
|---|
| 15 | <label for="name"><span>Name<b style="color:red">*</b>:</span><input type="text" name="translator_name" id="name" size="50" value="$!translator_name"/></label><br /> |
|---|
| 16 | <label for="mail"><span>Email address<b style="color:red">*</b>:</span><input type="text" name="translator_mail" id="mail" size="50" value="$!translator_mail"/></label><br /> |
|---|
| 17 | <label for="comments"><span>Comments:</span><textarea id="comments" name="translator_comments" rows="5" cols="20">$!translator_comments</textarea></label> |
|---|
| 18 | </fieldset> |
|---|
| 19 | |
|---|
| 20 | <fieldset class="translation"> |
|---|
| 21 | <legend>Translation |
|---|
| 22 | <a id="a_miss" title="Display only missings" href="#" style="display: none">Display only missings</a> |
|---|
| 23 | <a id="a_mod" title="Display only modified" href="#" style="display: none">Display only modified</a> |
|---|
| 24 | <a id="a_all" title="Display all" href="#" style="display: none">Display all</a> |
|---|
| 25 | </legend> |
|---|
| 26 | |
|---|
| 27 | <input type="hidden" name="${param_prefix}lang" value="$prop.get('lang')"/> |
|---|
| 28 | |
|---|
| 29 | <table style="width:100%"> |
|---|
| 30 | <thead> |
|---|
| 31 | <tr> |
|---|
| 32 | <th scope="col" class="first_col">$defaultProps.get("language") properties</th> |
|---|
| 33 | #set($percent = 100 * $math.div($math.sub($prop.size(), 2), $math.sub($defaultProps.size(), 2))) |
|---|
| 34 | <th scope="col">$prop.get("language") $percent.intValue()%</th> |
|---|
| 35 | </tr> |
|---|
| 36 | </thead> |
|---|
| 37 | <tbody> |
|---|
| 38 | #foreach($key in $defaultProps.keySet()) |
|---|
| 39 | #if (!$prop.get($key)) |
|---|
| 40 | <tr> |
|---|
| 41 | <th class="property_name" scope="row">$key <p>$!esc.html($defaultProps.get($key))</p></th> |
|---|
| 42 | <td class="missing"><input type="text" name="$prop.get('lang')_$key" value="$!esc.html($!prop.get($key))" /></td> |
|---|
| 43 | </tr> |
|---|
| 44 | #end |
|---|
| 45 | #end |
|---|
| 46 | #foreach($key in $defaultProps.keySet()) |
|---|
| 47 | #if ($key != "lang" && $key != "language" && $prop.get($key)) |
|---|
| 48 | <tr> |
|---|
| 49 | <th class="property_name" scope="row">$key <p>$!esc.html($defaultProps.get($key))</p></th> |
|---|
| 50 | <td #if(!$prop.get($key))class="missing"#end><input type="text" name="$prop.get('lang')_$key" value="$!esc.html($!prop.get($key))" /></td> |
|---|
| 51 | </tr> |
|---|
| 52 | #end |
|---|
| 53 | #end |
|---|
| 54 | </tbody> |
|---|
| 55 | </table> |
|---|
| 56 | |
|---|
| 57 | <div class="submit"> |
|---|
| 58 | <input type="hidden" name="translation_language" value="$prop.get('lang')" /> |
|---|
| 59 | <input type="submit" value="Submit" /> |
|---|
| 60 | </div> |
|---|
| 61 | </fieldset> |
|---|
| 62 | </form> |
|---|
| 63 | </div> |
|---|
| 64 | |
|---|
| 65 | #parse('footer.vm') |
|---|