Code

Updated mimetypes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Mar 2010 09:47:54 +0000 (09:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Mar 2010 09:47:54 +0000 (09:47 +0000)
-They are now listable again

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17429 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/mimetypes/class_filterMIMETYPES.inc [new file with mode: 0644]
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/mimetypes/generic.tpl
gosa-plugins/goto/admin/mimetypes/mimetype-filter-release.tpl
gosa-plugins/goto/admin/mimetypes/mimetype-filter-release.xml
gosa-plugins/goto/admin/mimetypes/mimetype-filter.xml
gosa-plugins/goto/admin/mimetypes/mimetype-list-release.tpl
gosa-plugins/goto/admin/mimetypes/mimetype-list-release.xml
gosa-plugins/goto/admin/mimetypes/mimetype-list.tpl
gosa-plugins/goto/admin/mimetypes/paste_generic.tpl
gosa-plugins/goto/admin/mimetypes/release_select.tpl

diff --git a/gosa-plugins/goto/admin/mimetypes/class_filterMIMETYPES.inc b/gosa-plugins/goto/admin/mimetypes/class_filterMIMETYPES.inc
new file mode 100644 (file)
index 0000000..eec5c29
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+class filterMIMETYPES extends filterLDAP{
+
+  static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+  {
+    $res = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
+
+    foreach($res as $id => $entry){
+      if(isset($entry['FAIstate']) && preg_match("/freeze/i", $entry['FAIstate'][0])){
+        $res[$id]['objectClass'][] = 'FAKE_OC_freeze';
+      }else{
+        $res[$id]['objectClass'][] = 'FAKE_OC_branch';
+      }
+    }
+    return($res);
+  }
+}
+?>
index 4b2c0b5729a12476bfdf2f5271c12225bf752b2b..6d6a2d9bfa57913ea12ed0a42ed2dcd57dcb2ad8 100644 (file)
@@ -27,6 +27,7 @@ class mimetypeManagement extends management
   var $plIcon  = "plugins/goto/images/mimetypes.png";
 
   var $mime_release = ""; // The currently selected release while in release management mode!
+  var $mime_base = ""; // The currently selected release while in release management mode!
 
   // Tab definition 
   protected $tabClass = "mimetabs";
@@ -35,16 +36,21 @@ class mimetypeManagement extends management
   protected $aclPlugin   = "mimetype";
   protected $objectName   = "mimetype";
 
+  var $releaseSelector = NULL;
+
   function __construct($config,$ui)
   {
     $this->config = $config;
     $this->ui = $ui;
+    $this->mime_base = get_ou('mimetypeRDN').$this->config->current['BASE'];
+    $this->mime_release = get_ou('mimetypeRDN').$this->config->current['BASE'];
 
     if($this->IsReleaseManagementActivated()){
-      $this->mime_release = get_ou('mimetypeRDN').$this->config->current['BASE'];
       $filter_xml = "mimetype-filter-release.xml";
-      $list_xml = "mimetype-list-release.xml";
+      $list_xml   = "mimetype-list-release.xml";
       $this->storagePoints= array("");
+      $releases = faiManagement::getReleaseStates($this->config,$this->mime_base);
+      $this->releaseSelector = new releaseSelector($releases, $this->mime_release, $this->mime_release);
     }else{
       $filter_xml = "mimetype-filter.xml";
       $list_xml = "mimetype-list.xml";
@@ -52,7 +58,7 @@ class mimetypeManagement extends management
     }
 
     // Build filter
-    if (session::global_is_set(get_class($this)."_filter")){
+    if (0 && session::global_is_set(get_class($this)."_filter")){
       $filter= session::global_get(get_class($this)."_filter");
     } else {
       $filter = new filter(get_template_path($filter_xml, true));
@@ -74,41 +80,84 @@ class mimetypeManagement extends management
     parent::__construct($config, $ui, "mimetypes", $headpage);
   }
 
+  /*! \brief   Overridden render method of class mangement.
+   *            this allows us to add a release selection box.
+   */
   function renderList()
   {
+    $smarty = get_smarty();
     $filter = $this->getFilter();
     $headpage = $this->getHeadpage();
-    if($this->IsReleaseManagementActivated()){    
-      $filter->setComboBoxOptions("RELEASE",$this->getReleaseList());
 
-      if(isset($_POST['RELEASE'])){
-        $this->mime_release = get_post('RELEASE');
-      }
+    // Display release selector
+    if($this->IsReleaseManagementActivated()){
+      $this->releaseSelector->update();
+      $this->mime_release = $this->releaseSelector->getBase();
       $headpage->setBase($this->mime_release);
+      $smarty->assign("RELEASE", $this->releaseSelector->render());
     }
 
     $headpage->update();
     $display = $headpage->render();
     return($this->getHeader().$display);
   }
 
-  function getReleaseList($base = "", $prefix ="")
+  /*! \brief  This method opens an existing object or a list of existing objects to be edited.
+   *
+   *
+   *  @param  String  'action'  The name of the action which was the used as trigger.
+   *  @param  Array   'target'  A list of object dns, which should be affected by this method.
+   *  @param  Array   'all'     A combination of both 'action' and 'target'.
+   */
+  function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
   {
-    $list = array();
-    if(empty($base)){
-      $base = get_ou('mimetypeRDN').$this->config->current['BASE'];
-      $list[$base] = "/";
+    management::editEntry($action,$target,$all,$altTabClass,$altTabType,$altAclCategory);
+    if($this->tabObject){
+      if(isset($this->tabObject->by_object['mimetype']->attrs['FAIstate'][0])){
+        $state = $this->tabObject->by_object['mimetype']->attrs['FAIstate'][0];
+        $this->tabObject->setReadOnly(preg_match("/freeze/i", $state));
+      }
     }
+  }
+
+  
+  /*! \brief   Someone wants to remove some object(s)
+   *            ask for a confirmation now.
+   */
+  function removeEntryRequested($action="",$target=array(),$all=array(),
+      $altTabClass ="", $altTabType = "",             $altAclCategory="")
+  {
+    // Close dialogs and remove locks for currently handled dns
+    $this->cancelEdit();
 
-    $ldap = $this->config->get_ldap_link();
-    $ldap->ls("(objectClass=FAIbranch)",$base,array("ou","FAIstate"));
-    while($release = $ldap->fetch()){
-      $list[$release['dn']] = $prefix.$release['ou'][0];
-      $list = array_merge($list,$this->getReleaseList($release['dn'],$prefix."&nbsp; "));
+    // Do not allow to remove objects with state freeezed
+    $errors = $disallowed = array();
+    $headpage = $this->getHeadpage();
+    foreach($target as $dn){
+
+      $obj = $headpage->getEntry($dn);
+      $acl  = $this->ui->get_permissions($obj['dn'],"mimetypes/mimetype");
+      if(!preg_match("/d/",$acl)){
+        $disallowed[] = $obj['dn'];
+      }elseif(isset($obj['FAIstate']) && preg_match('/freeze/i', $obj['FAIstate'][0])){
+        $errors[] = $obj['dn'];
+      }else{
+        $this->dns[] = $obj['dn'];
+      }
+    }
+    if(count($errors)){
+      msg_dialog::display(_("Branch locked"),
+          sprintf(_("The following entries are locked, you can't remove them %s."),
+            msgPool::buildList($errors)),INFO_DIALOG);
     }
-    return($list);
+    if(count($disallowed)){
+      msg_dialog::display(_("Permission error"), msgPool::permDelete($disallowed), ERROR_DIALOG);
+    }
+    return(management::removeEntryRequested($action, $this->dns));
   }
-  
+
 
   function IsReleaseManagementActivated()
   {
index ebbaf6e3a579c71c742320e8a7f4033dbe14e645..24a3be19c3d5b2130cbf357a3adb3b0ccc6a059d 100644 (file)
-<table style="width:100%" summary="{t}Mimetype generic{/t}">
-       <tr>
-               <td colspan="2">
-                       <h3>{t}Generic{/t}</h3>
-               </td>
-       </tr>
-       <tr>
-               <td style='width:50%; '>
-
-                       <table summary="{t}Mimetype settings{/t}">
-                               <tr>
-                                       <td>
-                                               {t}Mime type{/t}{$must}
-                                       </td>
-                                       <td>
-{render acl=$cnACL}
-                                               <input type="text" name='cn' value="{$cn}" title='{t}Please enter a name for the mime type here{/t}'>
-{/render}
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td>
-                                               {t}Mime group{/t}
-                                       </td>
-                                       <td>
-{render acl=$gotoMimeGroupACL}
-                                               <select name='gotoMimeGroup' title='{t}Categorize this mime type{/t}' size=1>
-                                                       {html_options output=$gotoMimeGroups values=$gotoMimeGroups selected=$gotoMimeGroup}
-                                               </select>
-{/render}
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td>
-                                               {t}Description{/t}
-                                       </td>
-                                       <td>
-{render acl=$descriptionACL}
-                                               <input type="text" name='description' value="{$description}" title='{t}Please specify a description{/t}'>
-{/render}
-                                       </td>
-                               </tr>
-{if !$isReleaseMimeType} 
-                               <tr>
-                                       <td><LABEL for="base">{t}Base{/t}{$must}</LABEL></td>
-                                       <td>
-       {render acl=$baseACL}
-               <select size="1" id="base" name="base" title="{t}Choose subtree to place application in{/t}">
-                       {html_options options=$bases selected=$base_select}
-               </select>
-       {/render}
-       {if !$isReleaseMimeType}
-               {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
-                       {image path="images/lists/folder.png" action="chooseBase" title="{t}Select a base{/t}"}
-
-               {/render}
-       {/if}
-                                       </td>
-                                </tr>
-
-{/if}
-                       </table>
-                       
-               </td>
-               <td class='left-border'>
-
-                       <table summary="{t}Picture settings{/t}">
-                               <tr>
-                                       <td>
-                                               <LABEL for="picture_file">{t}Icon{/t}</LABEL><br>
-{if $IconReadable}
-                                               {image path="{$gotoMimeIcon}"}
-                                                       style="width:48px; height:48; background-color:white; vertical-align:bottom;">
-{else}
-                                               {image path="images/empty.png"}
-                                                       style="width:48px; height:48; background-color:white; vertical-align:bottom;">
-{/if}
-                                       </td>
-                                       <td>
-
-                                               &nbsp;<br>
-                                               <input type="hidden" name="MAX_FILE_SIZE" value="100000">
-{render acl=$gotoMimeIconACL}
-                                               <input name="picture_file" type="file" size="20" maxlength="255" 
-                                                       accept="image/*.png" id="picture_file">
-{/render}
-{render acl=$gotoMimeIconACL}
-                                               <button type='submit' name='update_icon'>{t}Update{/t}</button>
-                                                       title="{t}Update mime type icon{/t}">
-{/render}
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
-       <tr>
-               <td colspan="2">
-                       <hr>
-               </td>
-       </tr>
-       <tr>
-               <td colspan="2">
-                       <h3>{t}Left click{/t}</h3>
-               </td>
-       </tr>
-       <tr>
-               <td style='width:50%; '>
-
-                       {t}File patterns{/t}{$must}
-{render acl=$gotoMimeFilePatternACL}   
-                       {$gotoMimeFilePatterns} 
-{/render}
-
-{render acl=$gotoMimeFilePatternACL}   
-                       <input type='text'       name='NewFilePattern'    value='' title='{t}Please specify a new file pattern{/t}'>
-{/render}
-{render acl=$gotoMimeFilePatternACL}   
-                       <button type='submit' name='AddNewFilePattern' title="{t}Add a new file pattern{/t}">{msgPool type=addButton}</button>
-
-{/render}
-               </td>
-               <td class='left-border'>
 
-                       {t}Applications{/t}
-{render acl=$gotoMimeApplicationACL}   
-                       {$gotoMimeApplications}         
-{/render}
-
-{render acl=$gotoMimeApplicationACL}   
-                       <select name="NewApplicationSelect" size=1>
-                               <option value="">-</option>
-                               {html_options options=$ApplicationList}
-                       </select>
-{/render}
-{render acl=$gotoMimeApplicationACL}   
-                       <input type='text'       name='NewApplication'    value='' title='{t}Enter an application name here{/t}'>
-{/render}
-{render acl=$gotoMimeApplicationACL}   
-                       <button type='submit' name='AddNewApplication' title="{t}Add application{/t}">{msgPool type=addButton}</button>
-
-{/render}
-               </td>
-       </tr>
-       <tr>    
-               <td colspan="2">
-                       <hr>
-               </td>
-       </tr>
-       <tr>    
-               <td colspan="2">
-                       <h3>{t}Embedding{/t}</h3>
-               </td>
-       </tr>
-       <tr>
-               <td style='width:50%; '>
-
-                               
-                       <table summary="{t}Left click actions{/t}">
-                               <tr>
-                                       <td>
-
-{render acl=$gotoMimeLeftClickActionACL}
-                                               <input type='radio' name='gotoMimeLeftClickAction_IE' value='I' 
-                                                       {if $gotoMimeLeftClickAction_I} checked {/if}>
-{/render}
-                                               {t}Show file in embedded viewer{/t}
-                                               <br>
-
-{render acl=$gotoMimeLeftClickActionACL}
-                                               <input type='radio' name='gotoMimeLeftClickAction_IE' value='E' 
-                                                       {if $gotoMimeLeftClickAction_E} checked {/if}>
-{/render}
-                                               {t}Show file in external viewer{/t}
-                                               <br>
-
-{render acl=$gotoMimeLeftClickActionACL}
-                                               <input type='checkbox' name='gotoMimeLeftClickAction_Q' value='1' 
-                                                       {if $gotoMimeLeftClickAction_Q} checked {/if}>
-{/render}
-                                               {t}Ask whether to save to local disk{/t}
-                                       </td>
-                               </tr>
-                       </table>
-                       
-               </td>
-               <td class='left-border'>
-
-                       {t}Applications{/t}
-{render acl=$gotoMimeEmbeddedApplicationACL}
-                       {$gotoMimeEmbeddedApplications}         
-{/render}
-{render acl=$gotoMimeEmbeddedApplicationACL}
-                       <select name="NewEmbeddedApplicationSelect" size=1>
-                               <option value="">-</option>
-                               {html_options options=$ApplicationList}
-                       </select>
-{/render}
-{render acl=$gotoMimeEmbeddedApplicationACL}
-                       <input type='text'       name='NewEmbeddedApplication'    value='' 
-                               title='{t}Enter an application name here{/t}'>
-{/render}
-{render acl=$gotoMimeEmbeddedApplicationACL}
-                       <button type='submit' name='AddNewEmbeddedApplication'>{msgPool type=addButton}</button>
-                               title='{t}Add application{/t}'>
-{/render}
-               </td>
-       </tr>
+<table style="width:100%" summary="{t}Mimetype generic{/t}">
+ <tr>
+  <td colspan="2">
+   <h3>{t}Generic{/t}
+   </h3>
+  </td>
+ </tr>
+ <tr>
+  <td style='width:50%; '>
+   <table summary="{t}Mimetype settings{/t}">
+    <tr>
+     <td>{t}Mime type{/t}
+      {$must}
+     </td>
+     <td>
+      {render acl=$cnACL}
+       <input type="text" name='cn' value="{$cn}" title='{t}Please enter a name for the mime type here{/t}'>
+      {/render}
+     </td>
+    </tr>
+    <tr>
+     <td>{t}Mime group{/t}
+     </td>
+     <td>
+      {render acl=$gotoMimeGroupACL}
+       <select name='gotoMimeGroup' title='{t}Categorize this mime type{/t}' size=1>
+        {html_options output=$gotoMimeGroups values=$gotoMimeGroups selected=$gotoMimeGroup}
+       </select>
+      {/render}
+     </td>
+    </tr>
+    <tr>
+     <td>{t}Description{/t}
+     </td>
+     <td>
+      {render acl=$descriptionACL}
+       <input type="text" name='description' value="{$description}" title='{t}Please specify a description{/t}'>
+      {/render}
+     </td>
+    </tr>
+    
+    {if !$isReleaseMimeType}
+     <tr>
+      <td><LABEL for="base">{t}Base{/t}
+       {$must}</LABEL>
+      </td>
+      <td>
+       {render acl=$baseACL}
+        <select size="1" id="base" name="base" title="{t}Choose subtree to place application in{/t}">
+         {html_options options=$bases selected=$base_select}
+        </select>
+       {/render}
+       
+       {if !$isReleaseMimeType}
+        {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
+         {image path="images/lists/folder.png" action="chooseBase" title="{t}Select a base{/t}"}
+        {/render}
+        
+       {/if}
+      </td>
+     </tr>
+     
+    {/if}
+   </table>
+  </td>
+  <td class='left-border'>
+   <table summary="{t}Picture settings{/t}">
+    <tr>
+     <td><LABEL for="picture_file">{t}Icon{/t}</LABEL>
+      <br>
+      
+      {if $IconReadable}
+       <img src="{$gotoMimeIcon}" border=1 alt='{t}Mime icon{/t}' style="width:48px; height:48; background-color:white; vertical-align:bottom;">
+       {else}
+       {image path="images/empty.png"}
+       
+      {/if}
+     </td>
+     <td>&nbsp;
+      <br>
+      <input type="hidden" name="MAX_FILE_SIZE" value="100000">
+      {render acl=$gotoMimeIconACL}
+       <input name="picture_file" type="file" size="20" maxlength="255"                                                        accept="image/*.png" id="picture_file">
+      {/render}
+      {render acl=$gotoMimeIconACL}
+       <button type='submit' name='update_icon'title="{t}Update mime type icon{/t}">{t}Update{/t}</button>
+      {/render}
+     </td>
+    </tr>
+   </table>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="2">
+   <hr>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="2">
+   <h3>{t}Left click{/t}
+   </h3>
+  </td>
+ </tr>
+ <tr>
+  <td style='width:50%; '>{t}File patterns{/t}
+   {$must}
+   {render acl=$gotoMimeFilePatternACL}
+    {$gotoMimeFilePatterns}
+   {/render}
+   {render acl=$gotoMimeFilePatternACL}
+    <input type='text'  name='NewFilePattern'    value='' title='{t}Please specify a new file pattern{/t}'>
+   {/render}
+   {render acl=$gotoMimeFilePatternACL}
+    <button type='submit' name='AddNewFilePattern' title="{t}Add a new file pattern{/t}">
+    {msgPool type=addButton}</button>
+   {/render}
+  </td>
+  <td class='left-border'>{t}Applications{/t}
+   {render acl=$gotoMimeApplicationACL}
+    {$gotoMimeApplications}
+   {/render}
+   {render acl=$gotoMimeApplicationACL}
+    <select name="NewApplicationSelect" size=1><option value="">-</option>
+     {html_options options=$ApplicationList}
+    </select>
+   {/render}
+   {render acl=$gotoMimeApplicationACL}
+    <input type='text'  name='NewApplication'    value='' title='{t}Enter an application name here{/t}'>
+   {/render}
+   {render acl=$gotoMimeApplicationACL}
+    <button type='submit' name='AddNewApplication' title="{t}Add application{/t}">
+    {msgPool type=addButton}</button>
+   {/render}
+  </td>
+ </tr>
+ <tr>
+  <td colspan="2">
+   <hr>
+  </td>
+ </tr>
+ <tr>
+  <td colspan="2">
+   <h3>{t}Embedding{/t}
+   </h3>
+  </td>
+ </tr>
+ <tr>
+  <td style='width:50%; '>
+   <table summary="{t}Left click actions{/t}">
+    <tr>
+     <td>
+      {render acl=$gotoMimeLeftClickActionACL}
+       
+       
+       <input type='radio' name='gotoMimeLeftClickAction_IE' value='I'                                                         {if $gotoMimeLeftClickAction_I} checked {/if}>
+      {/render}{t}Show file in embedded viewer{/t}
+      <br>
+      {render acl=$gotoMimeLeftClickActionACL}
+       
+       
+       <input type='radio' name='gotoMimeLeftClickAction_IE' value='E'                                                         {if $gotoMimeLeftClickAction_E} checked {/if}>
+      {/render}{t}Show file in external viewer{/t}
+      <br>
+      {render acl=$gotoMimeLeftClickActionACL}
+       
+       
+       <input type='checkbox' name='gotoMimeLeftClickAction_Q' value='1'                                                       {if $gotoMimeLeftClickAction_Q} checked {/if}>
+      {/render}{t}Ask whether to save to local disk{/t}
+     </td>
+    </tr>
+   </table>
+  </td>
+  <td class='left-border'>{t}Applications{/t}
+   {render acl=$gotoMimeEmbeddedApplicationACL}
+    {$gotoMimeEmbeddedApplications}
+   {/render}
+   {render acl=$gotoMimeEmbeddedApplicationACL}
+    <select name="NewEmbeddedApplicationSelect" size=1><option value="">-</option>
+     {html_options options=$ApplicationList}
+    </select>
+   {/render}
+   {render acl=$gotoMimeEmbeddedApplicationACL}
+    <input type='text'  name='NewEmbeddedApplication'    value=''                              title='{t}Enter an application name here{/t}'>
+   {/render}
+   {render acl=$gotoMimeEmbeddedApplicationACL}
+    <button type='submit' name='AddNewEmbeddedApplication'>
+    {msgPool type=addButton}</button>title='{t}Add application{/t}'>
+   {/render}
+  </td>
+ </tr>
 </table>
-<input type="hidden" name="MimeGeneric" value="1">
-<!-- Place cursor -->
-<script language="JavaScript" type="text/javascript">
-  <!-- // First input field on page
-       focus_field('cn');
-  -->
-</script>
+<input type="hidden" name="MimeGeneric" value="1"><!-- Place cursor -->
+<script language="JavaScript" type="text/javascript"><!-- // First input field on page focus_field('cn');  --></script>
\ No newline at end of file
index 5bd374563bb5618a2e6b95fed765f8e75979c0c2..7c12895c587b967ed64a223365506f8b3be19134 100644 (file)
@@ -1,25 +1,41 @@
+
 <div id="mainlist">
-  <div class="mainlist-header">
-   <p>{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
-   <div class="mainlist-nav">
-    <table summary="{$HEADLINE}">
-     <tr>
-      <td>{$ROOT}</td>
-      <td>{$BACK}</td>
-      <td>{$HOME}</td>
-      <td>{$RELOAD}</td>
-      <td class="left-border">{t}Base{/t} {$BASE}</td>
-      <td class="left-border">{$ACTIONS}</td>
-      <td class="left-border">{$FILTER}</td>
-     </tr>
-    </table>
-   </div>
+ <div class="mainlist-header">
+  <p>
+   {$HEADLINE}&nbsp;
+   {$SIZELIMIT}
+  </p>
+  <div class="mainlist-nav">
+   
+   <table summary="{$HEADLINE}">
+    <tr>
+     <td>
+      {$ROOT}
+     </td>
+     <td>
+      {$BACK}
+     </td>
+     <td>
+      {$HOME}
+     </td>
+     <td>
+      {$RELOAD}
+     </td>
+     <td class="left-border">{t}Base{/t}
+      {$BASE}
+     </td>
+     <td class="left-border">
+      {$ACTIONS}
+     </td>
+     <td class="left-border">
+      {$FILTER}
+     </td>
+    </tr>
+   </table>
   </div>
-
 {$LIST}
+ </div>
+ {$LIST}
 </div>
-
-<div class="clear"></div>
-
-<input type="hidden" name="ignore">
-
+<div class="clear">
+</div>
+<input type="hidden" name="ignore">
\ No newline at end of file
index 2225009306a6cf625efd73dec702e6ed23827b99..0e8b0629eb860136f0299874b88d1cff3c50eb3c 100644 (file)
@@ -2,47 +2,29 @@
 
 <filterdef>
   <definition>
-    <category>mimetype</category>
-    <template>mimetype-filter-release.tpl</template>
+    <category>mimetypes</category>
     <initial>true</initial>
+    <attribute>dn</attribute>
+    <attribute>objectClass</attribute>
+    <attribute>cn</attribute>
+    <attribute>description</attribute>
+    <attribute>FAIstate</attribute>
+    <default>default</default>
+    <scope>one</scope>
   </definition>
 
   <search>
+    <tag>default</tag>
+    <label>Default filter</label>
     <query>
-      <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=gotoMimeType)$NAME)</filter>
-      <attribute>dn</attribute>
-      <attribute>objectClass</attribute>
-      <attribute>cn</attribute>
-      <attribute>description</attribute>
+      <backend>MIMETYPES</backend>
+      <filter>(&amp;(objectClass=gotoMimeType)(cn=$))</filter>
     </query>
-    <scope>one</scope>
-  </search>
-
-  <element>
-    <tag>RELEASE</tag>
-    <type>combobox</type>
-    <value>Loading.</value>
-    <value>Loading..</value>
-    <value>Loading...</value>
-  </element>
-
-  <element>
-    <type>textfield</type>
-    <tag>NAME</tag>
-    <size>20</size>
-    <maxlength>60</maxlength>
-    <default></default>
-    <unset></unset>
-    <set>(|(cn=*$*)(description=*$*))</set>
-    <alphabet>true</alphabet>
     <autocomplete>
-      <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=gotoMimeType)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
       <attribute>cn</attribute>
       <frequency>0.5</frequency>
       <characters>3</characters>
     </autocomplete>
-  </element>
+  </search>
 
 </filterdef>
index 918e9c522f1b1ad6a1d0c86952736ad21b72ae53..922bbc39c7c08c41cde02e0e2537ad7b9eef49d1 100644 (file)
@@ -5,7 +5,7 @@
     <category>mimetypes</category>
     <initial>true</initial>
     <default>default</default>
-    <scope>one</scope>
+    <scope>auto</scope>
     <attribute>dn</attribute>
     <attribute>objectClass</attribute>
     <attribute>cn</attribute>
@@ -16,7 +16,7 @@
     <tag>default</tag>
     <label>Default filter</label>
     <query>
-      <backend>LDAP</backend>
+      <backend>MIMETYPES</backend>
       <filter>(&amp;(objectClass=gotoMimeType)(cn=$))</filter>
     </query>
     <autocomplete>
index 0833cbacc6e16d7f1a7240eb89486e9fe12dd653..7fcb0c75563326e312f2821a3fc202b3055dd931 100644 (file)
@@ -1,25 +1,32 @@
 
 <div id="mainlist">
-
-  <div class="mainlist-header">
-   <p>{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
-   <div class="mainlist-nav">
-    <table summary="{$HEADLINE}">
-     <tr>
-      <td>{$ROOT}</td>
-      <td>{$BACK}</td>
-      <td>{$HOME}</td>
-      <td>{$RELOAD}</td>
-      <td class="left-border">{t}Base{/t} {$BASE}</td>
-      <td class="left-border">{$ACTIONS}</td>
-      <td class="left-border">{$FILTER}</td>
-     </tr>
-    </table>
-   </div>
+ <div class="mainlist-header">
+  <p>
+   {$HEADLINE}&nbsp;
+   {$SIZELIMIT}
+  </p>
+  <div class="mainlist-nav">
+   
+   <table summary="{$HEADLINE}">
+    <tr>
+     <td>
+      {$RELOAD}
+     </td>
+     <td class="left-border">{t}Release{/t}
+      {$RELEASE}
+     </td>
+     <td class="left-border">
+      {$ACTIONS}
+     </td>
+     <td class="left-border">
+      {$FILTER}
+     </td>
+    </tr>
+   </table>
   </div>
-  {$LIST}
+ </div>
+ {$LIST}
 </div>
-
-<div class="clear"></div>
-
-<input type="hidden" name="ignore">
+<div class="clear">
+</div>
+<input type="hidden" name="ignore">
\ No newline at end of file
index a8baa1cc77752249228991d0a9014924212601d9..ab893e5888d3f9010ad09fad9d9e74e499387106 100644 (file)
 
     <action>
      <type>sub</type>
-     <image>images/lists/new.png</image>
+     <image>images/lists/element.png[new]</image>
      <label>Create</label>
 
      <action>
       <name>new</name>
       <type>entry</type>
-      <image>images/lists/new.png</image>
+      <image>plugins/goto/images/select_mimetype.png[new]</image>
       <label>Mime type</label>
      </action>
     </action>
index 69a2cb39ffce6dbbd2494eb1e65ed8384a856d15..815e541c1e62d2c8435c497d2960b15daea11d3f 100644 (file)
@@ -1,23 +1,39 @@
-<div id="mainlist">
 
-  <div class="mainlist-header">
-   <p>{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
-   <div class="mainlist-nav">
-    <table summary="{$HEADLINE}">
-     <tr>
-      <td>{$ROOT}</td>
-      <td>{$BACK}</td>
-      <td>{$HOME}</td>
-      <td>{$RELOAD}</td>
-      <td class="left-border">{t}Base{/t} {$BASE}</td>
-      <td class="left-border">{$ACTIONS}</td>
-      <td class="left-border">{$FILTER}</td>
-     </tr>
-    </table>
-   </div>
+<div id="mainlist">
+ <div class="mainlist-header">
+  <p>
+   {$HEADLINE}&nbsp;
+   {$SIZELIMIT}
+  </p>
+  <div class="mainlist-nav">
+   
+   <table summary="{$HEADLINE}">
+    <tr>
+     <td>
+      {$ROOT}
+     </td>
+     <td>
+      {$BACK}
+     </td>
+     <td>
+      {$HOME}
+     </td>
+     <td>
+      {$RELOAD}
+     </td>
+     <td class="left-border">{t}Base{/t}
+      {$BASE}
+     </td>
+     <td class="left-border">
+      {$ACTIONS}
+     </td>
+     <td class="left-border">
+      {$FILTER}
+     </td>
+    </tr>
+   </table>
   </div>
-
 {$LIST}
+ </div>
+ {$LIST}
 </div>
-
-<input type="hidden" name="ignore">
+<input type="hidden" name="ignore">
\ No newline at end of file
index 100fac3430ac6a462f411ea5936664856cae5688..00371a98e94afc190982e9544f31360ef653c5b2 100644 (file)
@@ -1,32 +1,29 @@
-<table style="width:100%" summary="{t}Mimetype settings{/t}">
-       <tr>
-               <td colspan="2">
-                       <h3>{t}Generic{/t}</h3>
-               </td>
-       </tr>
-       <tr>
-               <td style='width:50%; '>
 
-                               
-                       <table summary="{t}Mimetype generic{/t}">
-                               <tr>
-                                       <td>
-                                               {t}Mime type{/t}
-                                       </td>
-                                       <td>
-                                               <input type="text" name='cn' value="{$cn}" title='{t}Please enter a name for the mime type here{/t}'>
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td>
-                                               {t}Description{/t}
-                                       </td>
-                                       <td>
-                                               <input type="text" name='description' value="{$description}" title='{t}Please specify a description for this mime type here{/t}'>
-                                       </td>
-                               </tr>
-                       </table>
-                       
-               </td>
-       </tr>
-</table>
+<table style="width:100%" summary="{t}Mimetype settings{/t}">
+ <tr>
+  <td colspan="2">
+   <h3>{t}Generic{/t}
+   </h3>
+  </td>
+ </tr>
+ <tr>
+  <td style='width:50%; '>
+   <table summary="{t}Mimetype generic{/t}">
+    <tr>
+     <td>{t}Mime type{/t}
+     </td>
+     <td>
+      <input type="text" name='cn' value="{$cn}" title='{t}Please enter a name for the mime type here{/t}'>
+     </td>
+    </tr>
+    <tr>
+     <td>{t}Description{/t}
+     </td>
+     <td>
+      <input type="text" name='description' value="{$description}" title='{t}Please specify a description for this mime type here{/t}'>
+     </td>
+    </tr>
+   </table>
+  </td>
+ </tr>
+</table>
\ No newline at end of file
index f11b391ad1ba73c5015c2af917b08ece522d1020..43ff5367b27126a737924943ee2566f4fd5c8140 100644 (file)
@@ -1,17 +1,19 @@
+
 <div class="contentboxh" style="border-bottom:1px solid #B0B0B0;">
- <p class="contentboxh">{image path="{$branchimage}" align="right"}{t}Branches{/t}
-</p>
+ <p class="contentboxh">
+  {image path="
+  {$branchimage}" align="right"}{t}Branches{/t}
+ </p>
 </div>
 <div class="contentboxb">
  <table summary="" style="width:100%;">
   <tr>
-   <td>
-    {t}Current release{/t}&nbsp;
+   <td>{t}Current release{/t}&nbsp;
     <select name="mime_release" onChange="document.mainform.submit();" size=1>
-        {html_options output=$mime_releases values=$mime_releases selected=$mime_release}
+     {html_options output=$mime_releases values=$mime_releases selected=$mime_release}
     </select>
    </td>
   </tr>
  </table>
 </div>
-<br>
+<br>
\ No newline at end of file