From: hickert Date: Mon, 12 Dec 2005 07:17:34 +0000 (+0000) Subject: fixed style and regex input X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f4fcb86786d7ec4149d7a5590b6877deb00beebc;p=gosa.git fixed style and regex input git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2282 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc index 47561675f..1aad83f56 100644 --- a/plugins/admin/systems/class_servRepository.inc +++ b/plugins/admin/systems/class_servRepository.inc @@ -60,8 +60,9 @@ class servrepository extends plugin $display= ""; /* Smarty vars*/ + $smarty->assign("infoimage", get_template_path('images/info.png')); $smarty->assign("search_image", get_template_path('images/search.png')); - $smarty->assign("launchimage", get_template_path('images/small_filter.png')); + $smarty->assign("launchimage", get_template_path('images/launch.png')); $smarty->assign("tree_image", get_template_path('images/tree.png')); $smarty->assign("alphabet", generate_alphabet()); $smarty->assign("apply", apply_filter()); @@ -155,23 +156,36 @@ class servrepository extends plugin Repository setup dialog handling /END */ - $divlist = new divSelectBox("repositories"); + $divlist = new divList("repositories"); + $divlist->SetEntriesPerPage(12); $divlist->setHeight(400); + + $divlist->setHeader(array(array("string"=>_("Release"),"attach"=>"style='width:80px;'"), + array("string"=>_("Sections")), + array("string"=>_("Options"),"attach"=>"style='border-right:0px;width:69px;'") + ) ); + $link = "%s"; $edit = " "; $delete = ""; foreach($this->repositories as $name => $reps){ + $str = " "; + + if(preg_match("/".str_replace("*",".*",$this->regex)."/",$reps['Release'])){ + + foreach($reps['Sections'] as $sec){ $str.=$sec." "; } $divlist->AddEntry(array( - array("string"=>preg_replace("/%s/",$name,$link)), + array("string"=>preg_replace("/%s/",$name,$link),"attach"=>"style='width:80px;'"), array("string"=>sprintf($link,$name,_("Sections")." :".$str)), - array("string"=>preg_replace("/%s/",$name,$edit.$delete),"attach"=>"style='border-right:0px;'") + array("string"=>preg_replace("/%s/",$name,$edit.$delete),"attach"=>"style='border-right:0px;width:50px;text-align:right;'") )); + } } $smarty -> assign("Repositories",$divlist->DrawList()); @@ -200,6 +214,9 @@ class servrepository extends plugin function save_object() { plugin::save_object(); + if(isset($_POST['regex'])){ + $this->regex = $_POST['regex']; + } } diff --git a/plugins/admin/systems/servRepository.tpl b/plugins/admin/systems/servRepository.tpl index 72e3b1b86..c98e74a14 100644 --- a/plugins/admin/systems/servRepository.tpl +++ b/plugins/admin/systems/servRepository.tpl @@ -1,46 +1,50 @@ - - - - - + + + +
- -
-

- {t}Repositories{/t} -

-
- -
-

- {$Repositories} - -

-
- -
-
-

- [F] - {t}Filters{/t} -

-
- -
- - {$alphabet} -
- - - - - -
-   - -
- {$apply} -
-
+
+

+ {t}List of configured repositories.{/t} +

+
+
+{$Repositories} + +
+
+
+

[i]{t}Information{/t}

+
+
+

+ {t}This menu allows you to create, delete and edit FAI classes.{/t} +

+
+
+
+

+ [F]{t}Filters{/t} +

+
+
+ + {$alphabet} +
+ + + + + +
+ + +
+ {$apply} +
+
+ +