Skip to content

Commit

Permalink
Various small fixes discussed today with Dieter
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Elbers committed Jan 12, 2021
1 parent db3f87d commit d689ffa
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private void loadDoiProvider(Properties props, String key_prefix) {
String primary = props.getProperty(key_prefix+".primary");
String prefix = props.getProperty(key_prefix+".prefix");
String infix = props.getProperty(key_prefix+".infix");
logger.info("Loaded DOI infix: "+infix);
String username = props.getProperty(key_prefix+".username");
String password = props.getProperty(key_prefix+".password");
Configuration config = new Configuration(baseUrl, prefix, username, password);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div id="help">
<!-- Left column, TOC -->
<div class="col-xs-2 toc">
<h3>Table of conent:</h3>
<h3>Table of content:</h3>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
Expand Down Expand Up @@ -94,7 +94,7 @@ <h2>Browsing Collections</h2>
<p>
Available actions:
<ul>
<li>Click the <span class="toggle"></span> button to view the collection description.</li>
<li>Click the <span class="toggle glyphicon glyphicon-chevron-right"></span> button to view the collection description.</li>
<li>Click the collection title to view the complete collection details.</li>
<li>Click the <button type="button" class="btn btn-primary btn-xs"><span class="fa fa-quote-right"></span></button> button to get the citation details for this collection.</li>
</ul>
Expand Down Expand Up @@ -229,13 +229,7 @@ <h2>Managing Your Collections</h2>
</p>
<p>
Collection lifecycle:<br />
<pre>
.--> public
| ^
private -&lt; |
| |
.--> error
</pre>
<img width="300" alt="vcr lifecycle" wicket:id="img-vcr-lifecycle">
</p>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ public class HelpPage extends BasePage {
public static final String BASE_URI = "eu.clarin.cmdi.virtualcollectionregistry.base_uri";

public HelpPage() {
final String baseUri = WebApplication.get().getServletContext().getInitParameter(BASE_URI);

String baseUri = WebApplication.get().getServletContext().getInitParameter(BASE_URI);
if(baseUri.endsWith("/")) {
baseUri = baseUri.substring(0, baseUri.length()-1);
}
final String serviceBaseUri = String.format("%s/service", baseUri);
add(new ExternalLink("restLink", serviceBaseUri)
.add(new Label("restUrl", serviceBaseUri)));
Expand All @@ -50,6 +52,7 @@ public HelpPage() {
add(new Image("img-vcr-menu-create", new ContextRelativeResource("/images/help-vcr-menu-create.png")));
add(new Image("img-vcr-editor-modes", new ContextRelativeResource("/images/help-vcr-editor-modes.png")));
add(new Image("img-vcr-menu-my-collections", new ContextRelativeResource("/images/help-vcr-menu-my-collections.png")));
add(new Image("img-vcr-lifecycle", new ContextRelativeResource("/images/vcr-lifecycle.png")));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div wicket:id="author_email" class="col-xs-12 field-row">[NAME]</div>
<div wicket:id="author_affiliation" class="col-xs-12 field-row">[NAME]</div>
<div class="col-xs-12 field-row">
<div class="col-md-10 col-md-offset-2 col-xs-12"><i>Press &lt;return&gt; to add this author</i></div>
<div class="col-md-10 col-md-offset-2 col-xs-12"><i>Press &lt;enter&gt; to add this author</i></div>
</div>
</div>
</wicket:panel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<div class="col-xs-10">
<div wicket:id="ajaxwrapper">
<div wicket:id="lbl_no_authors">label</div>
<div wicket:id="lbl_no_authors" class="error-message">label</div>
<ul wicket:id="listview">
<div wicket:id="pnl_author_details">label</div>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div wicket:id="reference" class="col-xs-12 field-row">[URI]</div>
<div wicket:id="reference_title" class="col-xs-12 field-row">[TITLE]</div>
<div class="col-md-12 col-xs-12">
<div class="col-xs-12"><i>Press &lt;return&gt; to add this reference</i></div>
<div class="col-xs-12"><i>Press &lt;enter&gt; to add this reference</i></div>
</div>

<div class="col-md-10 col-md-offset-2 col-sm-12 help_message" wicket:id="help_message">
Expand All @@ -28,7 +28,7 @@

<!-- The list of references -->
<div class="col-md-12 col-md-offset-0 col-sm-12" wicket:id="ajaxwrapper" style="margin-top: 10px">
<div wicket:id="lbl_no_references"></div>
<div wicket:id="lbl_no_references" class="error-message"></div>
<div wicket:id="listview">
<div wicket:id="pnl_reference">label</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void handleCancelEvent(AjaxRequestTarget target) {
editorWrapper.add(editor);
add(editorWrapper);

lblNoReferences = new Label("lbl_no_references", "No resources found.<br />Please add one or more members that make up this virtual collection by means of a (persistent) reference. ");
lblNoReferences = new Label("lbl_no_references", "No references found.<br />Please add one or more members that make up this virtual collection by means of a (persistent) reference. ");
lblNoReferences.setEscapeModelStrings(false);

listview = new ListView("listview", references) {
Expand Down Expand Up @@ -383,7 +383,7 @@ public List<Resource> getData() {
}

public void setData(List<Resource> data) {
logger.info("Set resource data: {} resources", data.size());
logger.info("Set resource data: {} reference", data.size());
for(Resource r : data) {
this.references.add(new ReferenceJob(r));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void setInfix(String infix) {

//Make sure we return the default infix value if an empty infix has been set
protected String getInfix() {
if(this.infix.isEmpty()) {
if(this.infix == null || this.infix.isEmpty()) {
return PidProviderServiceImpl.DEFAULT_INFIX;
}
return infix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void setInfix(String infix) {

//Make sure we return the default infix value if an empty infix has been set
protected String getInfix() {
if(this.infix.isEmpty()) {
if(this.infix == null || this.infix.isEmpty()) {
return PidProviderServiceImpl.DEFAULT_INFIX;
}
return infix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head />
<body>
<wicket:extend>
<a data-toggle="collapse" wicket:id="pnl-btn-collapse" class="hover">
<a data-toggle="collapse" wicket:id="pnl-btn-collapse" class="hover collapsible">
<div class="panel-heading">
<h3 wicket:id="pnl-title" class="pnl-title"></h3>
</div>
Expand Down
10 changes: 7 additions & 3 deletions src/main/sass/vcr.scss
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ td.reference div div {



.panel-heading a:after {
.collapsible .panel-heading a:after {
font-family:'Glyphicons Halflings';
content:"\e114";
float: right;
color: grey;
}
.panel-heading a.collapsed:after {
.collapsible .panel-heading a.collapsed:after {
content:"\e080";
}

Expand Down Expand Up @@ -570,12 +570,16 @@ h1, h2, h3, h4, h5, h6 {
}

#help {
text-align: justify;
text-align: left;
display: inline-block;
height: 100%;
min-height: 100%;
}

#help .toggle {
color: #0080aa;
}

.toc {
position: sticky;
top: 15px;
Expand Down
Binary file added src/main/webapp/images/vcr-lifecycle.png
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 d689ffa

Please sign in to comment.