]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
some fixes
authorBanana <mail@bananas-playground.net>
Sun, 25 Feb 2024 10:35:59 +0000 (11:35 +0100)
committerBanana <mail@bananas-playground.net>
Sun, 25 Feb 2024 10:35:59 +0000 (11:35 +0100)
webclient/view/98/managecolletions/managecolletions.html
webclient/view/98/manageentry/field-upload.html
webclient/view/default/managecolletions/managecolletions.html
webclient/view/default/managecolletions/managecolletions.php
webclient/view/default/manageentry/field-upload.html

index ee6e1c6b42f551a974bf25002fdcf2812699d472..8eadd6f0fb7a37ca07e8cd0371abc902022762fd 100644 (file)
@@ -1,5 +1,39 @@
 <h3>Manage your collections</h3>
 <h4>Add or modify a collection</h4>
+
+<h4>Available collections</h4>
+<div class="sunken-panel">
+       <table width="100%">
+               <thead>
+               <tr>
+                       <th width="200px">Name</th>
+                       <th>Created</th>
+                       <th>Description</th>
+                       <th>Owner</th>
+                       <th>Group</th>
+                       <th>Rights</th>
+                       <th>Collection</th>
+                       <th>Fields</th>
+               </tr>
+               </thead>
+               <tbody>
+               <?php foreach($TemplateData['existingCollections'] as $k=>$v) { ?>
+               <tr>
+                       <td><?php echo $v['name']; ?></td>
+                       <td><?php echo $v['created']; ?></td>
+                       <td><?php echo $v['description']; ?></td>
+                       <td><?php echo $v['username']; ?></td>
+                       <td><?php echo $v['groupname']; ?></td>
+                       <td><?php echo $v['rights']; ?></td>
+                       <td><a href="index.php?p=managecolletions&m=edit&id=<?php echo $k; ?>">Edit</a></td>
+                       <td><a href="index.php?p=managecollectionfields&id=<?php echo $k; ?>">Edit</a></td>
+               </tr>
+               <?php } ?>
+               </tbody>
+       </table>
+</div>
+<p>&nbsp;</p>
+
 <blockquote>
        Any default field or any option which needs a field, get its values after the fields are configured.
 </blockquote>
@@ -20,9 +54,9 @@
                <label for="defaultSearchField">Default global search field</label>
                <select id="defaultSearchField" name="fdata[defaultSearchField]">
                        <option value="">Please select</option>
-                       <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
+                       <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { var_dump($v); ?>
                        <option value="<?php echo $v['identifier']; ?>"
-                       <?php if(isset($TemplateData['editData']['defaultSearchField'][$v['identifier']])) echo 'selected'; ?>
+                               <?php echo ($TemplateData['editData']['defaultSearchField'] ?? '') == $v['identifier'] ? 'selected' : ''; ?>
                        ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                        <?php } ?>
                </select>
@@ -49,7 +83,7 @@
                        <option value="">Please select</option>
                        <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
                        <option value="<?php echo $v['identifier']; ?>"
-                       <?php if(isset($TemplateData['editData']['defaultSortField'][$v['identifier']])) echo 'selected'; ?>
+                               <?php echo ($TemplateData['editData']['defaultSortField'] ?? '') == $v['identifier'] ? 'selected' : ''; ?>
                        ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                        <?php } ?>
                </select>
                <input type="submit" name="submitForm" value="Save" />
        </div>
 </form>
-
-<h4>Available collections</h4>
-<div class="sunken-panel">
-       <table width="100%">
-               <thead>
-                       <tr>
-                               <th width="200px">Name</th>
-                               <th>Created</th>
-                               <th>Description</th>
-                               <th>Owner</th>
-                               <th>Group</th>
-                               <th>Rights</th>
-                               <th>Collection</th>
-                               <th>Fields</th>
-                       </tr>
-               </thead>
-               <tbody>
-                       <?php foreach($TemplateData['existingCollections'] as $k=>$v) { ?>
-                       <tr>
-                               <td><?php echo $v['name']; ?></td>
-                               <td><?php echo $v['created']; ?></td>
-                               <td><?php echo $v['description']; ?></td>
-                               <td><?php echo $v['username']; ?></td>
-                               <td><?php echo $v['groupname']; ?></td>
-                               <td><?php echo $v['rights']; ?></td>
-                               <td><a href="index.php?p=managecolletions&m=edit&id=<?php echo $k; ?>">Edit</a></td>
-                               <td><a href="index.php?p=managecollectionfields&id=<?php echo $k; ?>">Edit</a></td>
-                       </tr>
-                       <?php } ?>
-               </tbody>
-       </table>
-</div>
index 9646afb23a1eefd59fbced8cf9849a53784d1f16..c8a448b47a6a7c5fe8366d2bdcac38ca8bec4e9b 100644 (file)
@@ -6,7 +6,7 @@
                />
 
                <?php if(isset($TemplateData['editData'][$field['identifier']])) { ?>
-               <?php echo '<a href="'.$TemplateData['storagePath'].'/'.$TemplateData['editData'][$field['identifier']] ?? ''.'">'.$TemplateData['editData'][$field['identifier']] ?? ''.'</a>'; ?>
+               <a target="_blank" href="<?php echo $TemplateData['storagePath'].'/'.$TemplateData['editData'][$field['identifier']]; ?>"><?php echo $TemplateData['editData'][$field['identifier']]; ?></a>
                <input type="checkbox" value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
                           name="fdata[<?php echo $field['identifier']; ?>_delete]"
                           title="Delete"
index c45e434cf1704344ca3554edd622e1da6b806837..725e21561d7a802c75437b3b62b3c1d490f67587 100644 (file)
@@ -30,8 +30,9 @@
                                                <option value="">Please select</option>
                                                <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
                                                <option value="<?php echo $v['identifier']; ?>"
-                                               <?php ($TemplateData['editData']['defaultSearchField'] ?? '') == $v['identifier'] ? 'selected' : ''; ?>
-                                               ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
+                                                       <?php echo ($TemplateData['editData']['defaultSearchField'] ?? '') == $v['identifier'] ? 'selected' : ''; ?>
+                                               >
+                                               <?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
                                                <?php } ?>
                                        </select>
                                        <small>
index d8d83bd3c33cbd9a3ba09f409c67aa6f4523f56f..68e85fb98aa81a8482546345ccc5ec5dc9a018cf 100644 (file)
@@ -144,6 +144,5 @@ if(isset($_POST['submitForm'])) {
                                }
                        }
                }
-
        }
 }
index f5dca9d7931264a7031eae36b48fe405e46ef5dd..9e6f6e77f21604929c610a3f24316fee36d3c05e 100644 (file)
@@ -6,7 +6,7 @@
                >
                <?php if(isset($TemplateData['editData'][$field['identifier']])) { ?>
                <div uk-lightbox>
-                       <?php echo '<a href="'.$TemplateData['storagePath'].'/'.$TemplateData['editData'][$field['identifier']] ?? ''.'">'.$TemplateData['editData'][$field['identifier']] ?? ''.'</a>'; ?>
+                       <a href="<?php echo $TemplateData['storagePath'].'/'.$TemplateData['editData'][$field['identifier']]; ?>" target="_blank"><?php echo $TemplateData['editData'][$field['identifier']]; ?></a>
                        <input type="checkbox" value="<?php echo $TemplateData['editData'][$field['identifier']] ?? ''; ?>"
                                   name="fdata[<?php echo $field['identifier']; ?>_delete]"
                                   title="Delete"