Skip to content

Commit

Permalink
Merge pull request #144 from Edirom/issue-111
Browse files Browse the repository at this point in the history
Remove publish column from main list page
  • Loading branch information
peterstadler authored Jan 26, 2023
2 parents b25ae1d + 402fddd commit 8743041
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 168 deletions.
31 changes: 4 additions & 27 deletions manual/basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ <h3><a name="File" id="File">Document list</a></h3>
This will open a new document in the metadata editor.</p>
<p><strong>Listing existing documents: </strong>Near the top of the documents list page,
a number of controls allow you to you choose which documents to list.
Use the first select box if you want to see only unpublished, modified or published documents.
The second select box lets you filter documents by collection,
A select box lets you filter documents by collection,
provided you have specified file collection information in your files.
You may also narrow the results using the keywords search.</p>
<p>Navigate through the result
Expand All @@ -58,33 +57,11 @@ <h3><a name="File" id="File">Document list</a></h3>
<li><strong>Rename file</strong>: Click the rename icon
<img alt="Rename" src="../resources/images/rename.png" height="16" width="16"/> to rename a document.<br/>
Please note that MerMEId does not update any references in other documents pointing to the renamed
one; in other words, links between documents are likely to be broken when renaming resources.<br/>
Only unpublished documents can be renamed to avoid orphaned (unreachable) documents in the
folder containing published documents. To rename a published document, unpublish it, rename, and
re-publish it.
</li>
<li><strong>Publish file(s)</strong>: The color of the checkboxes indicates whether the document is <br/>
<img alt="Green" style="vertical-align:bottom;" title="published"
src="../resources/images/checkbox_green.png" height="16" width="16"/> published and up to date, has been <br/>
<img alt="Yellow" style="vertical-align:bottom;" title="modified"
src="../resources/images/checkbox_yellow.png" height="16" width="16"/> modified since last publication, or is <br/>
<img alt="Red" style="vertical-align:bottom;" title="unpublished"
src="../resources/images/checkbox_red.png" height="16" width="16"/> unpublished.<br/>
To publish or unpublish documents, check the appropriate checkboxes and select the desired action from the
publish menu activated by moving the cursor over the publish menu button
<img alt="Menu" src="../resources/images/menu.gif" height="16" width="16" style="vertical-align:bottom;"/>.<br/>
<strong>Publishing</strong> in this context simply means that MerMEId copies the file to a separate
<a href="/storage/public/" target="_blank" title="Click to see the contents of your 'public' eXist collection">folder
named 'public'</a> in your eXist database.
How documents placed in the public folder are further processed or made available to others is outside the scope
of MerMEId and entirely depends on what your system is set up to do with them.<br/>
<strong>Unpublishing</strong> means that MerMEId deletes the copy of the document from the public folder.
one; in other words, links between documents are likely to be broken when renaming resources.
</li>
<li><strong>Delete file</strong>: Clicking the
delete icon <img alt="Delete" src="../resources/images/remove.gif" height="12" width="12"/> will display a warning that
you are about to delete the selected document. Click 'OK' to delete, otherwise 'Cancel'. <br/>
Please note that only unpublished documents can be deleted. To delete a previously published document
you will need to unpublish it first to make sure it is deleted from the public folder as well.
you are about to delete the selected document. Click 'OK' to delete, otherwise 'Cancel'.
</li>
</ul>
<h3><a name="editor" id="editor">The editor &#8211;
Expand Down Expand Up @@ -208,4 +185,4 @@ <h3><a name="HTML" id="HTML">HTML Preview</a></h3>
2017 Danish Centre for Music Editing | Royal Danish Library,
Copenhagen | <a name="www.kb.dk" id="www.kb.dk" href="http://www.kb.dk">www.kb.dk/en/nb/dcm</a></p>
</body>
</html>
</html>
12 changes: 0 additions & 12 deletions manual/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ <h1>Frequently Asked Questions (FAQ)</h1>
</ul>
<p>Publishing</p>
<ul>
<li><a href="#publishing">I have published a file from the file list, but nothing happens
except that the 'Publish' indicator turns green. What is supposed to happen?</a></li>
<li><a href="#cnw_ui">I would like to make a web catalog like the CNW. Is the user interface
included in MerMEId?</a></li>
</ul> Contact<br />
Expand Down Expand Up @@ -356,16 +354,6 @@ <h3>What else can I customize?<a name="customizations"></a></h3>
Can I turn it off?</a>
</p>
<h2>Publishing</h2>
<h3>I have published a file from the file list, but nothing happens except that the
'Publish' indicator turns green. What is supposed to happen?<a name="publishing"></a></h3>
<p>There's no way we can predict how and where you want to publish your data. By default,
therefore, MerMEId does nothing but copying the selected file(s) from an eXist database
folder named 'dcm' (where all your data are stored) to another folder named
'public'. It is up to you or your system administrator to decide what is going to happen
next. At DCM, we have set up a script that automatically copies all files from the 'public'
folder through the firewall to the published catalog on the web once a day. The script is
not part of MerMEId, but you are welcome to contact us if you would like to know in detail
how it works. </p>
<h3>I would like to make a web catalog like the CNW. Is the user interface included in
MerMEId?<a name="cnw_ui"></a></h3>
<p>No. MerMEId is a tool for creating and editing the XML data for a catalogue of works
Expand Down
15 changes: 1 addition & 14 deletions manual/workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,6 @@ <h2>Content editing</h2>
<li>To verify or proofread your data, use the HTML preview by clicking the document button <img alt="HTML preview"
src="../resources/images/html.gif" /> to generate a human-readable HTML page from the file.</li>
</ul>
<h2>Publishing to an online catalogue</h2>
<p>If you are creating a public online catalogue you will want to publish your data a some point. In MerMEId's list view,
files can be marked for publishing and 'published' (the meaning of the check box colours is explained as part of the
<a href="../manual/basics.html" title="MerMEId basics">MerMEId basics</a>.
</p>
<p>This process allows you to keep your files private until you consider them ready for publication or re-publication.
MerMEId also lets you 'unpublish' (withdraw) published files from the public catalogue without deleting them from your
database.</p>
<img class="illustration" alt="Publish" src="../resources/images/manual/workflow_publish.png"/>
<p>The actual effect – if any – of publishing your files depends on the setup of your system as explained in the
<a href="../manual/basics.html" title="MerMEId basics">MerMEId basics</a> and the
<a href="../manual/faq.html" title="MerMEId FAQ">Frequently Asked Questions</a>.
</p>
<h2>Creating a printed catalogue</h2>
<p>If you want to create a printed catalogue from your data, MerMEId can assist you some of the way. There is a tool
for outputting all files of a file collection (or portions of a collection; or all files in the database) as a single,
Expand All @@ -133,4 +120,4 @@ <h2>Creating a printed catalogue</h2>
2017 Danish Centre for Music Editing | Royal Danish Library,
Copenhagen | <a name="www.kb.dk" id="www.kb.dk" href="http://www.kb.dk">www.kb.dk/en/nb/dcm</a></p>
</body>
</html>
</html>
73 changes: 0 additions & 73 deletions modules/list_files.xq
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ declare function local:format-reference(
<td class="tools loginRequired">{app:edit-form-reference($doc)}</td>
<td class="tools loginRequired">{app:copy-document-reference($doc)}</td>
<td class="tools loginRequired">{app:rename-document-reference($doc)}</td>
<td class="tools loginRequired">{app:get-publication-reference($doc)}</td>
<td class="tools loginRequired">{app:delete-document-reference($doc)}</td>
<td nowrap="nowrap">{app:view-document-notes($doc)}</td>
</tr>
Expand Down Expand Up @@ -169,7 +168,6 @@ declare function local:format-reference(
<table class="filter_block">
<tr>
<td class="label">Filter by: &#160;</td>
<td class="label">Publication status</td>
<td class="label">Collection</td>
<td class="label">Search term <a class="help">?<span class="comment">Search terms may be combined using boolean operators. Wildcards allowed.
Search is case insensitive (except for boolean operators, which must be uppercase) and will query the whole document.
Expand Down Expand Up @@ -203,25 +201,6 @@ declare function local:format-reference(
</tr>
<tr>
<td>&#160;</td>
<td>
<form action="" method="get" id="status-selection">
<input name="page" value="1" type="hidden"/>
<select name="published_only" onchange="this.form.submit();">
{
for $alt in app:options()
let $option :=
if( $alt/@value eq session:get-attribute("published_only") ) then
<option value="{$alt/@value/text()}"
selected="selected">
{$alt/text()}
</option>
else
$alt
return $option
}
</select>
</form>
</td>
<td>
<form action="" method="get" id="collection-selection">
<input name="page" value="1" type="hidden"/>
Expand Down Expand Up @@ -268,58 +247,6 @@ declare function local:format-reference(
<th class="tools">Edit</th>
<th class="tools">Copy</th>
<th class="tools">Rename</th>
<th class="tools">
<form method="get" id="publish_form" action="./publish.xq" >
<div id="publish">
Publish
<img src="../resources/images/menu.png"
alt="Publishing menu"
onmouseover="document.getElementById('publish_menu').style.visibility='visible'"
onmouseout="document.getElementById('publish_menu').style.visibility='hidden'"
style="vertical-align: text-top;"/>
<div class="popup"
id="publish_menu"
onmouseover="document.getElementById('publish_menu').style.visibility='visible'"
onmouseout="document.getElementById('publish_menu').style.visibility='hidden'">

<button
type="submit"
onclick="document.getElementById('publishingaction').value='publish';">
<img src="../resources/images/publish.png" alt="Publish"/>
Publish selected files
</button>
<br/>
<button
type="submit"
onclick="document.getElementById('publishingaction').value='retract';">
<img src="../resources/images/unpublish.png" alt="Unpublish"/>
Unpublish selected files
</button>

<input name="publishing_action"
type="hidden"
value="publish"
id="publishingaction" />
<hr/>

<button type="button"
onclick="check_all();">
<img src="../resources/images/check_all.png" alt="Check all" title="Check all"/>
Select all files
</button>
<br/>
<button type="button"
onclick="un_check_all();">
<img src="../resources/images/uncheck_all.png"
alt="Uncheck all"
title="Uncheck all"/>
Unselect all files
</button>
</div>
</div>
</form>

</th>
<th class="tools">Delete</th>
<th>Notes</th>
</tr>
Expand Down
42 changes: 0 additions & 42 deletions modules/list_utils.xqm
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,6 @@ declare namespace xdb="http://exist-db.org/xquery/xmldb";
declare namespace html="http://www.w3.org/1999/xhtml";


declare function app:options() as node()*
{
let $options:=
(
<option value="">All documents</option>,
<option value="published">Published</option>,
<option value="modified">Modified</option>,
<option value="unpublished">Unpublished</option>)

return $options
};


declare function app:get-publication-reference($doc as node()) as element(html:form) {
let $doc-name:= util:document-name($doc)
let $color_style :=
if(doc-available(concat($config:data-public-root,'/',$doc-name)))
then (
let $dcmtime := xs:dateTime(xdb:last-modified($config:data-root, $doc-name))
let $pubtime := xs:dateTime(xdb:last-modified($config:data-public-root, $doc-name))
return
if($dcmtime lt $pubtime)
then "publishedIsGreen"
else "pendingIsYellow"
)
else "unpublishedIsRed"
return
<form id="formsourcediv{$doc-name}" action="" method="post"
style="display:inline;" xmlns="http://www.w3.org/1999/xhtml">
<div id="sourcediv{$doc-name}" style="display:inline;">
<input id="source{$doc-name}" type="hidden"
value="publish" name="dcm/{$doc-name}" title="file name"/>
<label class="{$color_style}" for='checkbox{$doc-name}'>
<input id='checkbox{$doc-name}'
onclick="add_publish('sourcediv{$doc-name}', 'source{$doc-name}', 'checkbox{$doc-name}');"
type="checkbox" name="button" value="" title="publish"/>
</label>
</div>
</form>
};


declare function app:view-document-notes($doc as node()) as element() {
let $note := $doc//m:fileDesc/m:notesStmt/m:annot[@type='private_notes']/string()
return
Expand Down
Binary file modified resources/images/manual/list_files.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8743041

Please sign in to comment.