]> 91.132.146.200 Git - bibliotheca-php.git/commitdiff
theme 98: manage collection view
authorBanana <mail@bananas-playground.net>
Sat, 29 Apr 2023 12:19:07 +0000 (14:19 +0200)
committerBanana <mail@bananas-playground.net>
Sat, 29 Apr 2023 12:19:07 +0000 (14:19 +0200)
webclient/view/98/managecolletions/managecolletions.html [new file with mode: 0644]
webclient/view/98/managetags/managetags.html
webclient/view/98/ui/css/style.css

diff --git a/webclient/view/98/managecolletions/managecolletions.html b/webclient/view/98/managecolletions/managecolletions.html
new file mode 100644 (file)
index 0000000..b8362f3
--- /dev/null
@@ -0,0 +1,251 @@
+<h3>Manage your collections</h3>
+<h4>Add or modify a collection</h4>
+<blockquote>
+       Any default field or any option which needs a field get its content after the fields are configured.
+</blockquote>
+
+<form method="post">
+       <div class="sunken-panel">
+               <table width="100%">
+                       <thead>
+                               <tr>
+                                       <th width="200px"></th>
+                                       <th></th>
+                                       <th>Note</th>
+                               </tr>
+                       </thead>
+                       <tbody>
+                               <tr>
+                                       <td><label for="name">Name *</label>
+                                       <td>
+                                               <input id="name" type="text" autocomplete="off" name="fdata[name]"
+                                   placeholder="Unique name. No special chars." size="30"
+                                       value="<?php echo Summoner::ifset($TemplateData['editData'], 'name'); ?>">
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td><label for="description">Description</label></td>
+                                       <td>
+                                               <input id="description" type="text" autocomplete="off" size="30" name="fdata[description]"
+                                              value="<?php echo Summoner::ifset($TemplateData['editData'], 'description'); ?>">
+                              </td>
+                              <td></td>
+                               </tr>
+                               <tr >
+                                       <td><label for="defaultSearchField">Default global search field</label></td>
+                                       <td>
+                                               <select id="defaultSearchField" name="fdata[defaultSearchField]">
+                                                       <option value="">Please select</option>
+                                                       <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
+                                                       <option value="<?php echo $v['identifier']; ?>"
+                                                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'defaultSearchField', $v['identifier'])) echo 'selected'; ?>
+                                                       ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
+                                                       <?php } ?>
+                                               </select>
+                                       </td>
+                                       <td>
+                                               The field is used in the global search. Altering the default search field results in
+                                               a DB reindex. This could take some time, depending on the amount of data.
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td><label for="defaultSortField">Default sort field</label></td>
+                                       <td>
+                                               <select id="defaultSortField" name="fdata[defaultSortField]">
+                                                       <option value="">Please select</option>
+                                                       <?php foreach($TemplateData['simpleSearchFields'] as $k=>$v) { ?>
+                                                       <option value="<?php echo $v['identifier']; ?>"
+                                                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'defaultSortField', $v['identifier'])) echo 'selected'; ?>
+                                                       ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
+                                                       <?php } ?>
+                                               </select>
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td><label for="defaultSortOrder">Default sort order</label></td>
+                                       <td>
+                                               <select id="defaultSortOrder" name="fdata[defaultSortOrder]">
+                                                       <option value="ASC" <?php if(Summoner::ifsetValue($TemplateData['editData'], 'defaultSortOrder', 'ASC')) echo 'selected'; ?>>ASCENDING</option>
+                                                       <option value="DESC" <?php if(Summoner::ifsetValue($TemplateData['editData'], 'defaultSortOrder', 'DESC')) echo 'selected'; ?>>DESCENDING</option>
+                                               </select>
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td><label for="advancedSearchTableFields">Table advanced search view</label></td>
+                                       <td>
+                                               <select id="advancedSearchTableFields" name="fdata[advancedSearchTableFields][]" multiple="multiple" size="5">
+                                                       <?php foreach($TemplateData['existingFields'] as $k=>$v) { ?>
+                                                       <option value="<?php echo $v['id']; ?>"
+                                                       <?php if(Summoner::ifset($TemplateData['editData']['advancedSearchTableFields'], $v['id'])) echo 'selected'; ?>
+                                                       ><?php echo $v['displayname']; ?> (<?php echo $v['type']; ?>)</option>
+                                                       <?php } ?>
+                                               </select>
+                                       </td>
+                                       <td>Make sure that the default global search field is in this list. This does not limit the fields to search in.</td>
+                               </tr>
+                               <tr>
+                                       <td><label for="tool">Tools</label></td>
+                                       <td>
+                                               <select id="tool" name="fdata[tool][]" multiple="multiple" size="5">
+                                                       <option value="">None</option>
+                                                       <?php foreach($TemplateData['toolSelection'] as $k=>$v) { ?>
+                                                       <option value="<?php echo $k; ?>"
+                                                       <?php if(Summoner::ifset($TemplateData['editData']['tool'],$k)) echo 'selected'; ?>
+                                                       ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
+                                                       <?php } ?>
+                                               </select>
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td><label for="owner">Owner *</label></td>
+                                       <td>
+                                               <select id="owner" name="fdata[owner]">
+                                                       <option value="">Please select</option>
+                                                       <?php foreach($TemplateData['ownerSelection'] as $k=>$v) { ?>
+                                                       <option value="<?php echo $k; ?>"
+                                                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'owner',$k)) echo 'selected'; ?>
+                                                       ><?php echo $v['login']; ?> (<?php echo $v['name']; ?>)</option>
+                                                       <?php } ?>
+                                               </select>
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td><label for="group">Group *</label></td>
+                                       <td>
+                                               <select id="group" name="fdata[group]">
+                                                       <option value="">Please select</option>
+                                                       <?php foreach($TemplateData['groupSelection'] as $k=>$v) { ?>
+                                                       <option value="<?php echo $k; ?>"
+                                                       <?php if(Summoner::ifsetValue($TemplateData['editData'], 'group',$k)) echo 'selected'; ?>
+                                                       ><?php echo $v['name']; ?> (<?php echo $v['description']; ?>)</option>
+                                                       <?php } ?>
+                                               </select>
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <tr>
+                                       <td><label>Rights *</label></td>
+                                       <td>
+                                               <div class="sunken-panel">
+                                                       <table>
+                                                               <thead>
+                                                                       <tr>
+                                                                               <th>User</th>
+                                                                               <th>Group</th>
+                                                                               <th>Other</th>
+                                                                       </tr>
+                                                               </thead>
+                                                               <tbody>
+                                                                       <tr>
+                                                                               <td>
+                                                                                       <input id="user_read" type="checkbox" name="fdata[rights][user][read]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'read', 'r')) echo "checked"; ?>>
+                                                                                       <label for="user_read">r &nbsp; &nbsp; &nbsp;</label>
+
+                                                                                       <input id="user_write" type="checkbox" name="fdata[rights][user][write]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'write', 'w')) echo "checked"; ?>>
+                                                                                       <label for="user_write">w &nbsp; &nbsp; &nbsp;</label>
+
+                                                                                       <input id="user_delete" type="checkbox" name="fdata[rights][user][delete]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['user'], 'delete', 'x')) echo "checked"; ?>>
+                                                                                       <label for="user_delete">x &nbsp; &nbsp; &nbsp;</label>
+                                                                               </td>
+                                                                               <td>
+                                                                                       <input id="group_read" type="checkbox" name="fdata[rights][group][read]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'read', 'r')) echo "checked"; ?>>
+                                                                                       <label for="group_read">r &nbsp; &nbsp; &nbsp;</label>
+
+                                                                                       <input id="group_write" type="checkbox" name="fdata[rights][group][write]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'write', 'w')) echo "checked"; ?>>
+                                                                                       <label for="group_write">w &nbsp; &nbsp; &nbsp;</label>
+
+                                                                                       <input id="group_delete" type="checkbox" name="fdata[rights][group][delete]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['group'], 'delete', 'x')) echo "checked"; ?>>
+                                                                                       <label for="group_delete">x &nbsp; &nbsp; &nbsp;</label>
+                                                                               </td>
+                                                                               <td>
+                                                                                       <input id="other_read" type="checkbox" name="fdata[rights][other][read]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'read', 'r')) echo "checked"; ?>>
+                                                                                       <label for="other_read">r &nbsp; &nbsp; &nbsp;</label>
+
+                                                                                       <input id="other_write" type="checkbox" name="fdata[rights][other][write]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'write', 'w')) echo "checked"; ?>>
+                                                                                       <label for="other_write">w &nbsp; &nbsp; &nbsp;</label>
+
+                                                                                       <input id="other_delete" type="checkbox" name="fdata[rights][other][delete]" value="1"
+                                                                                       <?php if(Summoner::ifsetValue($TemplateData['editData']['rights']['other'], 'delete', 'x')) echo "checked"; ?>>
+                                                                                       <label for="other_delete">x &nbsp; &nbsp; &nbsp;</label>
+                                                                               </td>
+                                                                       </tr>
+                                                               </tbody>
+                                                       </table>
+                                               </div>
+                                       </td>
+                                       <td></td>
+                               </tr>
+                               <?php if(Summoner::ifset($TemplateData['editData'], 'name')) { ?>
+                               <tr>
+                                       <td>Update entry with collection rights</td>
+                                       <td>
+                                               <input id="doRightsForEntries" type="checkbox" name="fdata[doRightsForEntries]" value="1">
+                                               <label for="doRightsForEntries">&nbsp;</label>
+                                       </td>
+                                       <td>
+                                               Warning: This will overwrite existing entry rights (user, group, rights) with the ones from the collection!
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>Delete</td>
+                                       <td>
+                                               <input id="doDelete" type="checkbox" name="fdata[doDelete]" value="1">
+                                               <label for="doDelete">&nbsp;</label>
+                                       </td>
+                                       <td>Warning: This will delete ALL the data in this collection!</td>
+                               </tr>
+                               <?php } ?>
+                       </tbody>
+               </table>
+       </div>
+
+       <div class="field-row">
+               <input type="submit" name="submitForm" value="Save" />
+       </div>
+</form>
+
+<h4 class="uk-h4">Available collections</h4>
+<div class="sunken-panel">
+       <table width="100%">
+               <thead>
+                       <tr>
+                               <th width="200px">Name</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']; ?><br/>
+                                       <small><?php echo $v['created']; ?></small>
+                               </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 6969871452ccb73d4ddea54799563eec8e86e717..d023f3a993ec28227fcd546c65cfe4934cd67e9a 100644 (file)
@@ -11,7 +11,7 @@
 
        <?php if(!empty($TemplateData['tags'])) { ?>
                <form method="post">
-                       <div  class="sunken-panel">
+                       <div class="sunken-panel">
                                <table width="100%">
                                        <thead>
                                                <tr>
index dde325a3fd6bed4c5ad3ec0449b51b3b15f74764..2c2e22aaa07e849e3f69cd8877c17d2e84178b37 100644 (file)
@@ -2,6 +2,17 @@ body {
     background: #c0c0c0;
 }
 
+blockquote {
+    background-color: #dfdfdf;
+    margin: 0 0 20px;
+    padding: 20px;
+}
+
+select[multiple="multiple"] {
+    height: initial;
+    background-image: initial;
+}
+
 .window {
     font-family: Arial;
 }