diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-05-26 21:52:40 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-05-26 21:52:40 +0200 |
commit | 88099c2986b9fd75fb4de3ae2066b66770bbe8ef (patch) | |
tree | c8086228367fb988a940b4408160076c5102c405 /ratatoeskr | |
parent | 0915d74865b0cab61c3a505e802b80ac048cdd3f (diff) | |
parent | 04b47bc50dd147ad2156a29bdb274049f99d9bce (diff) | |
download | ratatoeskr-cms-88099c2986b9fd75fb4de3ae2066b66770bbe8ef.tar.gz ratatoeskr-cms-88099c2986b9fd75fb4de3ae2066b66770bbe8ef.tar.bz2 ratatoeskr-cms-88099c2986b9fd75fb4de3ae2066b66770bbe8ef.zip |
Merge branch 'feature-ui-improvements' into develop
Diffstat (limited to 'ratatoeskr')
21 files changed, 255 insertions, 232 deletions
diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index a1ab570..3670137 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -39,25 +39,6 @@ function maketags($tagnames, $lang) return $rv; } -/* Generates Yes/No form / checks it. */ -function askyesno($ste, $callback, $question, $yes=NULL, $no=NULL, $moredetails="") -{ - if(isset($_POST["yes"])) - return True; - if(isset($_POST["no"])) - return False; - - $ste->vars["callback"] = $callback; - $ste->vars["question"] = $question; - if($yes !== NULL) - $ste->vars["yestext"] = $yes; - if($no !== NULL) - $ste->vars["notext"] = $no; - if($moredetails !== NULL) - $ste->vars["moredetails"] = $moredetails; - return $ste->exectemplate("/systemtemplates/areyousure.html"); -} - $backend_subactions = NULL; function build_backend_subactions() @@ -421,149 +402,136 @@ $backend_subactions = url_action_subactions(array( "tags" => function(&$data, $url_now, &$url_next) { global $translation, $languages, $ste, $rel_path_to_root; - $ste->vars["section"] = "content"; - $ste->vars["submenu"] = "tags"; - list($tagname, $tagaction) = $url_next; $url_next = array(); - if(isset($tagname)) + $ste->vars["section"] = "content"; + $ste->vars["submenu"] = "tags"; + $ste->vars["pagetitle"] = $translation["tags_overview"]; + + if(isset($_POST["delete"]) and ($_POST["really_delete"] == "yes")) { - try + foreach($_POST["tag_multiselect"] as $tagid) { - $tag = Tag::by_name($tagname); + try + { + $tag = Tag::by_id($tagid); + $tag->delete(); + } + catch(DoesNotExistError $e) + { + continue; + } } - catch(DoesNotExistError $e) + + $ste->vars["success"] = $translation["tags_successfully_deleted"]; + } + + if(isset($_POST["save_changes"])) + { + $newlang = (!empty($_POST["new_language"])) ? $_POST["new_language"] : NULL; + $newtag = NULL; + + if(!empty($_POST["newtagname"])) { - throw new NotFoundError(); + if((strpos(@$_POST["new_tag_name"], ",") !== False) or (strpos(@$_POST["new_tag_name"], " ") !== False)) + $ste->vars["error"] = $translation["invalid_tag_name"]; + else + $newtag = $_POST["newtagname"]; } - if(isset($tagaction)) + if(($newlang !== NULL) and (!isset($languages[$newlang]))) + $newlang = NULL; + if($newtag !== NULL) { - switch($tagaction) + try { - case "delete": - $ste->vars["pagetitle"] = str_replace("[[TAGNAME]]", $tag->name, $translation["delete_tag_pagetitle"]); - $yesnoresp = askyesno($ste, "$rel_path_to_root/backend/content/tags/{$tag->name}/delete", $translation["delete_comment_question"]); - if(is_string($yesnoresp)) - { - echo $yesnoresp; - return; - } - - if($yesnoresp) - { - $tag->delete(); - echo $ste->exectemplate("/systemtemplates/tag_deleted.html"); - } - else - goto backend_content_tags_overview; /* Hopefully no dinosaur will attack me: http://xkcd.com/292/ :-) */ - break; - case "addtranslation": - $ste->vars["pagetitle"] = $translation["tag_add_lang"]; - $ste->vars["tagname"] = $tag->name; - if(isset($_POST["addtranslation"])) - { - $errors = array(); - if(!isset($languages[@$_POST["language"]])) - $errors[] = $translation["language_unknown"]; - if(empty($_POST["translation"])) - $errors[] = $translation["no_translation_text_given"]; - if(empty($errors)) - { - $tag->title[$_POST["language"]] = new Translation($_POST["translation"], ""); - $tag->save(); - $ste->vars["success"] = $translation["tag_translation_added"]; - goto backend_content_tags_overview; - } - else - $ste->vars["errors"] = $errors; - } - echo $ste->exectemplate("/systemtemplates/tag_addtranslation.html"); - break; + $newtag = Tag::create($newtag); + } + catch(AlreadyExistsError $e) + { + $newtag = NULL; } } - } - else - { - backend_content_tags_overview: - if(isset($_POST["create_new_tag"])) + $translations = array(); + foreach($_POST as $k => $v) { - if((strpos(@$_POST["new_tag_name"], ",") !== False) or (strpos(@$_POST["new_tag_name"], " ") !== False) or (strlen(@$_POST["new_tag_name"]) == 0)) - $ste->vars["error"] = $translation["invalid_tag_name"]; - else + if(preg_match('/tagtrans_(NEW|[a-z]{2})_(.*)/', $k, $matches) == 1) { - try - { - $tag = Tag::create($_POST["new_tag_name"]); - $tag->title[$data["user"]->language] = new Translation($_POST["new_tag_name"], ""); - $tag->save(); - $ste->vars["success"] = $translation["tag_created_successfully"]; - } - catch(AlreadyExistsError $e) - { - $ste->vars["error"] = $translation["tag_name_already_in_use"]; - } + $lang = ($matches[1] == "NEW") ? $newlang : $matches[1]; + $tag = $matches[2]; + if($lang === NULL) + continue; + $translations[$tag][$lang] = $v; } } - if(isset($_POST["edit_translations"])) + foreach($translations as $tag => $langmap) { - $tagbuffer = array(); - foreach($_POST as $k => $v) + if($tag == "NEW") + { + if($newtag === NULL) + continue; + $tag = $newtag; + } + else { - if(preg_match("/^tagtrans_(.*?)_(.*)$/", $k, $matches)) + try { - if(!isset($languages[$matches[1]])) - continue; - - if(!isset($tagbuffer[$matches[2]])) - { - try - { - $tagbuffer[$matches[2]] = Tag::by_name($matches[2]); - } - catch(DoesNotExistError $e) - { - continue; - } - } - - if(empty($v) and isset($tagbuffer[$matches[2]]->title[$matches[1]])) - unset($tagbuffer[$matches[2]]->title[$matches[1]]); - elseif(empty($v)) - continue; - else - $tagbuffer[$matches[2]]->title[$matches[1]] = new Translation($v, ""); + $tag = Tag::by_id($tag); + } + catch(DoesNotExistError $e) + { + continue; } } - foreach($tagbuffer as $tag) - $tag->save(); + foreach($langmap as $l => $text) + { + if(empty($text)) + unset($tag->title[$l]); + else + $tag->title[$l] = new Translation($text, ""); + } - $ste->vars["success"] = $translation["tag_titles_edited_successfully"]; + $tag->save(); } - $ste->vars["pagetitle"] = $translation["tags_overview"]; - - $alltags = Tag::all(); - usort($alltags, function($a, $b) { return strcmp($a->name, $b->name); }); - $ste->vars["all_tag_langs"] = array(); - $ste->vars["alltags"] = array(); - foreach($alltags as $tag) - { - $tag_pre = array("name" => $tag->name, "translations" => array()); - foreach($tag->title as $langcode => $translation_obj) - { - $tag_pre["translations"][$langcode] = $translation_obj->text; - if(!isset($ste->vars["all_tag_langs"][$langcode])) - $ste->vars["all_tag_langs"][$langcode] = $languages[$langcode]["language"]; - } - $ste->vars["alltags"][] = $tag_pre; + $ste->vars["success"] = $translation["tags_successfully_edited"]; + } + + $ste->vars["alltags"] = array(); + $taglangs = array(); + + $alltags = Tag::all(); + foreach($alltags as $tag) + { + $transls = array(); + foreach($tag->title as $l => $t) + { + if(!in_array($l, $taglangs)) + $taglangs[] = $l; + $transls[$l] = $t->text; } - echo $ste->exectemplate("/systemtemplates/tags_overview.html"); + + $ste->vars["alltags"][] = array( + "id" => $tag->get_id(), + "name" => $tag->name, + "translations" => $transls + ); } + + $unused_langs = array_diff(array_keys($languages), $taglangs); + + $ste->vars["all_tag_langs"] = array(); + foreach($taglangs as $l) + $ste->vars["all_tag_langs"][$l] = $languages[$l]["language"]; + $ste->vars["unused_languages"] = array(); + foreach($unused_langs as $l) + $ste->vars["unused_languages"][$l] = $languages[$l]["language"]; + + echo $ste->exectemplate("/systemtemplates/tags_overview.html"); }, "articles" => function(&$data, $url_now, &$url_next) { diff --git a/ratatoeskr/cms_style/images/backendbg.png b/ratatoeskr/cms_style/images/backendbg.png Binary files differnew file mode 100644 index 0000000..995e8cf --- /dev/null +++ b/ratatoeskr/cms_style/images/backendbg.png diff --git a/ratatoeskr/cms_style/images/expandarrow_collapsed.png b/ratatoeskr/cms_style/images/expandarrow_collapsed.png Binary files differnew file mode 100644 index 0000000..62f662b --- /dev/null +++ b/ratatoeskr/cms_style/images/expandarrow_collapsed.png diff --git a/ratatoeskr/cms_style/images/expandarrow_expanded.png b/ratatoeskr/cms_style/images/expandarrow_expanded.png Binary files differnew file mode 100644 index 0000000..a5e4c41 --- /dev/null +++ b/ratatoeskr/cms_style/images/expandarrow_expanded.png diff --git a/ratatoeskr/cms_style/layout.css b/ratatoeskr/cms_style/layout.css index 1163887..aac132a 100644 --- a/ratatoeskr/cms_style/layout.css +++ b/ratatoeskr/cms_style/layout.css @@ -19,6 +19,7 @@ a:hover { body, html { margin: 0px; padding:0px; + background: white url(images/backendbg.png) bottom right no-repeat fixed; } hr { @@ -241,6 +242,10 @@ table.listtab td { border-top: 1px solid #eee; } +table.listtab th, table.listtab td { + padding: 0mm 1mm 0mm; +} + table.listtab tr:first-child td { border-top: 1px solid #666; } @@ -249,6 +254,10 @@ table.listtab tbody tr:hover { background: #eee; } +table.listtab tbody input[type="text"] { + width: 100%; +} + textarea.codeedit { font-family: monospace; } @@ -257,3 +266,21 @@ ul.bulletfree { list-style: none; padding-left: 0mm; } + +.metabar_element_expanded, .metabar_element_collapsed { + min-height: 12px; + padding-left: 12px; + cursor: pointer; +} + +.metabar_element_expanded:hover, .metabar_element_collapsed:hover { + text-decoration: underline; +} + +.metabar_element_expanded { + background: url(images/expandarrow_expanded.png) 0px 4px no-repeat; +} + +.metabar_element_collapsed { + background: url(images/expandarrow_collapsed.png) 0px 4px no-repeat; +}
\ No newline at end of file diff --git a/ratatoeskr/js/backend.js b/ratatoeskr/js/backend.js new file mode 100644 index 0000000..d131bfe --- /dev/null +++ b/ratatoeskr/js/backend.js @@ -0,0 +1,19 @@ +$(function() +{ + $("div.articleeditor-metabar-element h2").addClass("metabar_element_expanded").click(function() + { + self = $(this); + if(self.hasClass("metabar_element_expanded")) + { + self.removeClass("metabar_element_expanded"); + self.addClass("metabar_element_collapsed"); + $("div.articleeditor-metabar-element-content", self.parent()).hide("fast"); + } + else + { + self.removeClass("metabar_element_collapsed"); + self.addClass("metabar_element_expanded"); + $("div.articleeditor-metabar-element-content", self.parent()).show("fast"); + } + }); +});
\ No newline at end of file diff --git a/ratatoeskr/libs/INFO b/ratatoeskr/libs/INFO index 60d4df4..e2bc19b 100644 --- a/ratatoeskr/libs/INFO +++ b/ratatoeskr/libs/INFO @@ -17,3 +17,9 @@ This directory will hold some libraries Ratatöskr needs. Place "kses.php" from the archive directly into this directory. kses can be found at <http://sourceforge.net/projects/kses/> + +4. jQuery + + Place jquery.min.js into this folder. + + jQuery can be found at <http://jquery.com>
\ No newline at end of file diff --git a/ratatoeskr/licenses/jquery b/ratatoeskr/licenses/jquery new file mode 100644 index 0000000..0dee009 --- /dev/null +++ b/ratatoeskr/licenses/jquery @@ -0,0 +1,20 @@ +Copyright (c) 2012 John Resig, http://jquery.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file diff --git a/ratatoeskr/templates/src/systemtemplates/areyousure.html b/ratatoeskr/templates/src/systemtemplates/areyousure.html deleted file mode 100644 index 0d40585..0000000 --- a/ratatoeskr/templates/src/systemtemplates/areyousure.html +++ /dev/null @@ -1,11 +0,0 @@ -<ste:load name="master.html" /> -<ste:block name="content"> - <div class="pos_center"> - <h2><ste:escape>$question</ste:escape></h2> - ?{$moredetails|<p><ste:escape>$moredetails</ste:escape></p>|} - <form action="$callback" method="post"> - <input type="submit" class="yes_btn" name="yes" value="<ste:escape>?{$yestext|$yestext|<ste:get_translation for='yes' raw='y' />}</ste:escape>" /> - <input type="submit" class="no_btn" name="no" value="<ste:escape>?{$notext|$notext|<ste:get_translation for='no' raw='y' />}</ste:escape>" /> - </form> - </div> -</ste:block> diff --git a/ratatoeskr/templates/src/systemtemplates/content_write.html b/ratatoeskr/templates/src/systemtemplates/content_write.html index 3d63c61..08d6ec1 100644 --- a/ratatoeskr/templates/src/systemtemplates/content_write.html +++ b/ratatoeskr/templates/src/systemtemplates/content_write.html @@ -26,33 +26,40 @@ </div> <div class="column_right"> - <h2><ste:get_translation for="settings_meta" /></h2> - - <p><ste:get_translation for="urlname" />: <input type="text" name="urlname" value="<ste:escape>$urlname</ste:escape>" class="fullwidth" /></p> - <p> - <ste:get_translation for="article_section" />: - <select name="section" class="fullwidth"> - <ste:foreach array="sections" value="section_name"> - <option value="<ste:escape>$section_name</ste:escape>"?{~{$section_name|eq|$article_section}| selected="selected"|}><ste:escape>$section_name</ste:escape></option> - </ste:foreach> - </select> - </p> - <p><ste:get_translation for="tags_cs" />: <input type="text" name="tags" value="<ste:escape>$tags</ste:escape>" class="fullwidth" /></p> - <p><ste:get_translation for="date_time" />:<br />(YYYY-MM-DD HH:MM:SS) <input type="text" name="date"?{$date| value="<ste:date timestamp='$date'>%Y-%m-%d %H:%M:%S</ste:date>"|} class="fullwidth" /></p> - <p> - <ste:get_translation for="article_status" />: - <ste:set var="article_status">?{$article_status|$article_status|1}</ste:set> - <select name="article_status" class="fullwidth"> - <option value="0"?{~{$article_status|eq|0}| selected="selected"|}><ste:get_translation for="article_status_hidden" /></option> - <option value="1"?{~{$article_status|eq|1}| selected="selected"|}><ste:get_translation for="article_status_live" /></option> - <option value="2"?{~{$article_status|eq|2}| selected="selected"|}><ste:get_translation for="article_status_sticky" /></option> - </select> - </p> - <p><ste:get_translation for="allow_comments" />: <input type="checkbox" name="allow_comments" value="yes" ?{$allow_comments|checked="checked" |}/></p> + <div class="articleeditor-metabar-element"> + <h2><ste:get_translation for="settings_meta" /></h2> + <div class="articleeditor-metabar-element-content"> + <p><ste:get_translation for="urlname" />: <input type="text" name="urlname" value="<ste:escape>$urlname</ste:escape>" class="fullwidth" /></p> + <p> + <ste:get_translation for="article_section" />: + <select name="section" class="fullwidth"> + <ste:foreach array="sections" value="section_name"> + <option value="<ste:escape>$section_name</ste:escape>"?{~{$section_name|eq|$article_section}| selected="selected"|}><ste:escape>$section_name</ste:escape></option> + </ste:foreach> + </select> + </p> + <p><ste:get_translation for="tags_cs" />: <input type="text" name="tags" value="<ste:escape>$tags</ste:escape>" class="fullwidth" /></p> + <p><ste:get_translation for="date_time" />:<br />(YYYY-MM-DD HH:MM:SS) <input type="text" name="date"?{$date| value="<ste:date timestamp='$date'>%Y-%m-%d %H:%M:%S</ste:date>"|} class="fullwidth" /></p> + <p> + <ste:get_translation for="article_status" />: + <ste:set var="article_status">?{$article_status|$article_status|1}</ste:set> + <select name="article_status" class="fullwidth"> + <option value="0"?{~{$article_status|eq|0}| selected="selected"|}><ste:get_translation for="article_status_hidden" /></option> + <option value="1"?{~{$article_status|eq|1}| selected="selected"|}><ste:get_translation for="article_status_live" /></option> + <option value="2"?{~{$article_status|eq|2}| selected="selected"|}><ste:get_translation for="article_status_sticky" /></option> + </select> + </p> + <p><ste:get_translation for="allow_comments" />: <input type="checkbox" name="allow_comments" value="yes" ?{$allow_comments|checked="checked" |}/></p> + </div> + </div> <ste:foreach array="displayed_plugins" value="plugin"> - <h2><ste:escape>$plugin[label]</ste:escape></h2> - <ste:load name="$plugin[template]" /> + <div class="articleeditor-metabar-element"> + <h2><ste:escape>$plugin[label]</ste:escape></h2> + <div class="articleeditor-metabar-element-content"> + <ste:load name="$plugin[template]" /> + </div> + </div> </ste:foreach> </div> diff --git a/ratatoeskr/templates/src/systemtemplates/image_list.html b/ratatoeskr/templates/src/systemtemplates/image_list.html index 7b40ddc..fe600aa 100644 --- a/ratatoeskr/templates/src/systemtemplates/image_list.html +++ b/ratatoeskr/templates/src/systemtemplates/image_list.html @@ -47,11 +47,7 @@ </tbody> </table> <div> - <input type="submit" name="delete" value="<ste:get_translation for='delete' />" /> - <select name="really_delete"> - <option value="no" selected="selected"><ste:get_translation for="no" /></option> - <option value="yes"><ste:get_translation for="yes" /></option> - </select> + <ste:default_delete_yesno /> </div> </form> </div> diff --git a/ratatoeskr/templates/src/systemtemplates/master.html b/ratatoeskr/templates/src/systemtemplates/master.html index ddf6d08..bce92b1 100755 --- a/ratatoeskr/templates/src/systemtemplates/master.html +++ b/ratatoeskr/templates/src/systemtemplates/master.html @@ -19,12 +19,21 @@ </ste:then> </ste:if> </ste:mktag> +<ste:mktag name="default_delete_yesno"> + <input type="submit" name="?{$_tag_parameters[name]|$_tag_parameters[name]|delete}" value="<ste:get_translation for='delete' />" /> + <select name="really_delete"> + <option value="no" selected="selected"><ste:get_translation for="no" /></option> + <option value="yes"><ste:get_translation for="yes" /></option> + </select> +</ste:mktag> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title><ste:get_translation for="section_$section" />::<ste:escape>$pagetitle</ste:escape> - Ratatöskr</title> + <script type="text/javascript" src="$rel_path_to_root/ratatoeskr/libs/jquery.min.js"></script> + <script type="text/javascript" src="$rel_path_to_root/ratatoeskr/js/backend.js"></script> <ste:mktag name="cms_style"><link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/ratatoeskr/cms_style/<ste:tagcontent />" /></ste:mktag> <ste:cms_style>layout.css</ste:cms_style> <ste:foreach array="additional_styles" value="cssfile"><ste:cms_style>$cssfile</ste:cms_style></ste:foreach> diff --git a/ratatoeskr/templates/src/systemtemplates/repos.html b/ratatoeskr/templates/src/systemtemplates/repos.html index f724ece..31de6a5 100644 --- a/ratatoeskr/templates/src/systemtemplates/repos.html +++ b/ratatoeskr/templates/src/systemtemplates/repos.html @@ -45,11 +45,7 @@ </tbody> </table> <div> - <input type="submit" name="delete_repos" value="<ste:get_translation for='delete' />" /> - <select name="really_delete"> - <option value="no" selected="selected"><ste:get_translation for="no" /></option> - <option value="yes"><ste:get_translation for="yes" /></option> - </select> + <ste:default_delete_yesno name="delete_repos" /> | <input type="submit" name="force_repo_refresh" value="<ste:get_translation for='force_repo_refresh' />" /> </div> diff --git a/ratatoeskr/templates/src/systemtemplates/sections.html b/ratatoeskr/templates/src/systemtemplates/sections.html index b67563d..7ac3241 100644 --- a/ratatoeskr/templates/src/systemtemplates/sections.html +++ b/ratatoeskr/templates/src/systemtemplates/sections.html @@ -56,10 +56,7 @@ </tbody> </table> <div> - <input type="submit" name="delete" value="<ste:get_translation for='delete' />" /> <select name="really_delete"> - <option value="no" selected="selected"><ste:get_translation for="no" /></option> - <option value="yes"><ste:get_translation for="yes" /></option> - </select> + <ste:default_delete_yesno /> | <input type="submit" name="make_default" value="<ste:get_translation for='make_default' />" /> | diff --git a/ratatoeskr/templates/src/systemtemplates/settings.html b/ratatoeskr/templates/src/systemtemplates/settings.html index b7fee48..31021fe 100644 --- a/ratatoeskr/templates/src/systemtemplates/settings.html +++ b/ratatoeskr/templates/src/systemtemplates/settings.html @@ -38,7 +38,7 @@ </tbody> </table> <div> - <input type="submit" name="delete" value="<ste:get_translation for='delete' />" /> <select name="really_delete"><option value="no" selected="selected"><ste:get_translation for="no" /></option><option value="yes"><ste:get_translation for="yes" /></option></select> + <ste:default_delete_yesno /> | <input type="submit" name="make_default" value="<ste:get_translation for='make_default' />" /> | diff --git a/ratatoeskr/templates/src/systemtemplates/styles.html b/ratatoeskr/templates/src/systemtemplates/styles.html index 71464fb..30c4277 100644 --- a/ratatoeskr/templates/src/systemtemplates/styles.html +++ b/ratatoeskr/templates/src/systemtemplates/styles.html @@ -27,11 +27,7 @@ </tbody> </table> <div> - <input type="submit" name="delete" value="<ste:get_translation for='delete' />" /> - <select name="really_delete"> - <option value="no" selected="selected"><ste:get_translation for="no" /></option> - <option value="yes"><ste:get_translation for="yes" /></option> - </select> + <ste:default_delete_yesno /> </div> </form> <hr /> diff --git a/ratatoeskr/templates/src/systemtemplates/tags_overview.html b/ratatoeskr/templates/src/systemtemplates/tags_overview.html index 1f5b8d5..e82fd61 100644 --- a/ratatoeskr/templates/src/systemtemplates/tags_overview.html +++ b/ratatoeskr/templates/src/systemtemplates/tags_overview.html @@ -7,41 +7,52 @@ <table class="listtab"> <thead> <tr> + <th> </th> <th><ste:get_translation for="tag_name" /></th> - <th><ste:get_translation for="delete" /></th> <ste:foreach array="all_tag_langs" key="langcode" value="langname"> <th>($langcode) <ste:escape>$langname</ste:escape></th> </ste:foreach> - <th><ste:get_translation for="tag_add_lang" /></th> + <th> + <select name="new_language"> + <option value="" selected="selected"><ste:get_translation for="tag_add_lang" /></option> + <ste:foreach array="unused_languages" key="langcode" value="langname"> + <option value="$langcode">$langcode: <ste:escape>$langname</ste:escape></option> + </ste:foreach> + </select> + </th> </tr> </thead> <tbody> <ste:foreach array="alltags" value="tagdata"> <tr> - <td>$tagdata[name]</td> - <td> - <a href="$rel_path_to_root/backend/content/tags/$tagdata[name]/delete"><img src="$rel_path_to_root/ratatoeskr/cms_style/images/delete.png" alt="<ste:get_translation for='delete' />" /></a> - </td> + <td><input type="checkbox" name="tag_multiselect[]" value="$tagdata[id]" /></td> + <td><ste:escape>$tagdata[name]</ste:escape></td> <ste:foreach array="all_tag_langs" key="langcode" value="_"> <td> - <input type="text" name="tagtrans_${langcode}_${tagdata[name]}" value="<ste:escape>$tagdata[translations][$langcode]</ste:escape>" /> + <input type="text" name="tagtrans_${langcode}_${tagdata[id]}" value="<ste:escape>$tagdata[translations][$langcode]</ste:escape>" /> </td> </ste:foreach> <td> - <a href="$rel_path_to_root/backend/content/tags/$tagdata[name]/addtranslation"><img src="$rel_path_to_root/ratatoeskr/cms_style/images/add.png" alt="<ste:get_translation for='tag_add_lang' />" /></a> + <input type="text" name="tagtrans_NEW_${tagdata[id]}" /> </td> </tr> </ste:foreach> + <tr> + <td> </td> + <td><input type="text" name="newtagname" /></td> + <ste:foreach array="all_tag_langs" key="langcode" value="_"> + <td> + <input type="text" name="tagtrans_${langcode}_NEW" /> + </td> + </ste:foreach> + <td> + <input type="text" name="tagtrans_NEW_NEW" /> + </td> + </tr> </tbody> </table> - <div><input type="submit" name="edit_translations" /></div> + <div> + <ste:default_delete_yesno /> | <input type="submit" name="save_changes" value="<ste:get_translation for='save_changes' />"> + </div> </form> - - <div> - <h2><ste:get_translation for="create_new_tag" /></h2> - <form action="$rel_path_to_root/backend/content/tags" method="post" accept-charset="UTF-8"> - <p><ste:get_translation for="new_tag_name" />: <input type="text" name="new_tag_name" /></p> - <p><input type="submit" name="create_new_tag" /></p> - </form> - </div> </ste:block> diff --git a/ratatoeskr/templates/src/systemtemplates/templates.html b/ratatoeskr/templates/src/systemtemplates/templates.html index eca33cf..1a33e31 100644 --- a/ratatoeskr/templates/src/systemtemplates/templates.html +++ b/ratatoeskr/templates/src/systemtemplates/templates.html @@ -27,11 +27,7 @@ </tbody> </table> <div> - <input type="submit" name="delete" value="<ste:get_translation for='delete' />" /> - <select name="really_delete"> - <option value="no" selected="selected"><ste:get_translation for="no" /></option> - <option value="yes"><ste:get_translation for="yes" /></option> - </select> + <ste:default_delete_yesno /> </div> </form> </div> diff --git a/ratatoeskr/templates/src/systemtemplates/users.html b/ratatoeskr/templates/src/systemtemplates/users.html index d9542a2..255759a 100644 --- a/ratatoeskr/templates/src/systemtemplates/users.html +++ b/ratatoeskr/templates/src/systemtemplates/users.html @@ -39,7 +39,7 @@ </tbody> </table> <div> - <input type="submit" name="delete_groups" value="<ste:get_translation for='delete' />" /><select name="really_delete"><option value="no" selected="selected"><ste:get_translation for="no" /></option><option value="yes"><ste:get_translation for="yes" /></option></select> + <ste:default_delete_yesno name="delete_groups" /> </div> </form> @@ -72,7 +72,7 @@ </tbody> </table> <div> - <input type="submit" name="delete_users" value="<ste:get_translation for='delete' />" /><select name="really_delete"><option value="no" selected="selected"><ste:get_translation for="no" /></option><option value="yes"><ste:get_translation for="yes" /></option></select> + <ste:default_delete_yesno name="delete_users" /> </div> </form> </div> diff --git a/ratatoeskr/translations/de.php b/ratatoeskr/translations/de.php index 66c68d8..56ebf4e 100644 --- a/ratatoeskr/translations/de.php +++ b/ratatoeskr/translations/de.php @@ -61,25 +61,18 @@ $translation = array( "allow_comments" => "Kommentare erlauben?", "article_name_already_in_use" => "Artikelname bereits vergeben.", "article_save_success" => "Artikel erfolgreich abgespeichert.", - "delete_tag_pagetitle" => "\"[[TAGNAME]]\" löschen", - "delete_comment_question" => "Möchtest du diesen Tag löschen?", - "tag_deleted" => "Tag gelöscht.", - "back_to_tags" => "Zurück zu Inhalt::Tags", - "create_new_tag" => "Neuen Tag erstellen", + "tags_successfully_deleted" => "Tags erfolgreich gelöscht.", "new_tag_name" => "Name", + "tags_successfully_edited" => "Tags erfolgreich bearbeitet.", "tags_overview" => "Tag Übersicht", "tag_name" => "Tag Name", "yes" => "Ja", "no" => "Nein", "tag_add_lang" => "Übersetzung hinzufügen", + "save_changes" => "Änderungen speichern", "language_unknown" => "Unbekannte Sprache", - "no_translation_text_given" => "Kein Übersetzungstext angegeben.", "translation_added_successfully" => "Übersetzung erfolgreich hinzufügefügt.", - "tag_translation_added" => "Übersetzung hinzugefügt.", "invalid_tag_name" => "Ungülter Tagname. Ein Tagname darf keine Kommas (,) oder Leerzeichen ( ) enthalten und darf nicht leer sein.", - "tag_name_already_in_use" => "Tagname bereits vergeben.", - "tag_created_successfully" => "Tag erfolgreich erstellt.", - "tag_titles_edited_successfully" => "Tagtitel erfolgreich geändert.", "available_languages" => "Verfügbare Sprachen", "tags" => "Tags", "section" => "Sektion", diff --git a/ratatoeskr/translations/en.php b/ratatoeskr/translations/en.php index 27374c6..86e17a2 100644 --- a/ratatoeskr/translations/en.php +++ b/ratatoeskr/translations/en.php @@ -61,25 +61,18 @@ $translation = array( "allow_comments" => "Allow comments?", "article_name_already_in_use" => "Article name is already in use.", "article_save_success" => "Article successfully saved.", - "delete_tag_pagetitle" => "Delete \"[[TAGNAME]]\"", - "delete_comment_question" => "Do you want to delete this tag?", - "tag_deleted" => "Tag was deleted.", - "back_to_tags" => "Go back to Content::Tags", - "create_new_tag" => "Create a new Tag", + "tags_successfully_deleted" => "Tags successfully deleted.", "new_tag_name" => "Name", + "tags_successfully_edited" => "Successfully edited tags.", "tags_overview" => "Tag Overview", "tag_name" => "Tag name", "yes" => "Yes", "no" => "No", "tag_add_lang" => "Add translation", + "save_changes" => "Save changes", "language_unknown" => "Unknown language", - "no_translation_text_given" => "No translation text given.", "translation_added_successfully" => "Translation added successfully.", - "tag_translation_added" => "Translation added.", "invalid_tag_name" => "Invalid tag name. A tag name can not contain commas (,) or spaces ( ) and must not be empty.", - "tag_name_already_in_use" => "Tag name already in use.", - "tag_created_successfully" => "Tag created successfully.", - "tag_titles_edited_successfully" => "Tag titles changed successfully.", "available_languages" => "Available languages", "tags" => "Tags", "section" => "Section", |