changeset 149:a279d80fae42

cleanup. added links to Entity Details in Author and Text display forms.
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Tue, 11 Jul 2017 18:24:08 +0200
parents b40a84944716
children 29c4b64caad0
files src/main/webapp/search/displayAuthor.xhtml src/main/webapp/search/displayTitle.xhtml
diffstat 2 files changed, 38 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/webapp/search/displayAuthor.xhtml	Tue Jul 11 17:44:50 2017 +0200
+++ b/src/main/webapp/search/displayAuthor.xhtml	Tue Jul 11 18:24:08 2017 +0200
@@ -24,13 +24,19 @@
 
 			<h:panelGrid columns="1" styleClass="mainPanel">
 
-
-
+                <h:panelGroup>
 				<h:commandButton title="Edit This Entity" value="Edit form"
 					image="#{ApplicationBean1.editImage}"
 					action="#{Session.displayAuthor.actionEditAuthor}"
 					rendered="#{Session.canEdit}" />
-
+                <h:outputLink
+                    value="#{ApplicationBean1.root}/browse/entityDetails.xhtml?eid=#{Session.displayAuthor.selectedAuthorId}" title="Metadata of the entity"
+                    styleClass="displayButton">
+                    <h:graphicImage 
+                        value="#{ApplicationBean1.imgNetwork32}"
+                        width="18" height="18"/>
+                </h:outputLink>                             
+                </h:panelGroup>
 
 				<h:panelGrid columns="2" styleClass="displayPanel"
 					columnClasses="displayPanelColumn01,displayPanelColumn02">
@@ -39,7 +45,7 @@
 
 					<h:panelGrid columns="2">
 						<h:outputText value="#{Session.displayAuthor.author.privacity} - " />
-						<h:commandLink value="change" rendered="#{Session.user != null}"
+						<h:commandLink value="change" rendered="#{Session.canEdit}"
 							actionListener="#{Session.displayAuthor.changePrivacity4Person}"
 							onclick="if(!confirm('Do you really want to change the privacity of this person?')){ return; };" />
 					</h:panelGrid>
@@ -154,7 +160,7 @@
 						styleClass="titlePanel" />
 
 					<h:panelGrid columns="1"
-						rendered="#{(!empty Session.displayAuthor.titleItems) and Session.user != null }">
+						rendered="#{(!empty Session.displayAuthor.titleItems) and Session.canEdit }">
 						<a4j:commandLink value="Make all public"
 							actionListener="#{Session.displayAuthor.listenerMakeAllTitlesPublic}"
 							onclick="if(!confirm('Do you really want to change the privacity these titles?\nThis action can take some minutes.')){ return; };"
@@ -193,13 +199,17 @@
 							<h:panelGrid columns="2">
 								<h:outputText
 									value="#{Session.displayAuthor.title.privacity} - " />
-								<h:commandLink value="change" rendered="#{Session.user != null}"
+								<h:commandLink value="change" rendered="#{Session.canEdit}"
 									actionListener="#{Session.displayAuthor.changePrivacity4Title}"
 									onclick="if(!confirm('Do you really want to change the privacity of this title?')){ return; };" />
 							</h:panelGrid>
 
 							<h:outputText value="Title ID" />
-							<h:outputText value="#{Session.displayAuthor.selectedTitleId}" />
+							<h:outputLink
+                                value="#{ApplicationBean1.root}/browse/entityDetails.xhtml?eid=#{Session.displayAuthor.selectedTitleId}" 
+                                title="Metadata of the entity">
+							  <h:outputText value="#{Session.displayAuthor.selectedTitleId}" />
+						    </h:outputLink>
 
 							<h:outputText value="Full title" />
 							<h:outputText value="#{Session.displayAuthor.title.fullTitle}" />
@@ -317,7 +327,7 @@
 								styleClass="titlePanel" />
 
 							<h:panelGrid columns="1"
-								rendered="#{(!empty Session.displayAuthor.witnessItems) and Session.user != null}">
+								rendered="#{(!empty Session.displayAuthor.witnessItems) and Session.canEdit}">
 								<h:commandLink value="Make all public"
 									actionListener="#{Session.displayAuthor.listenerMakeAllWitnessesPublic}"
 									onclick="if(!confirm('Do you really want to change the privacity these witnesses?\nThis action can take some minutes.')){ return; };" />
@@ -358,13 +368,17 @@
 									<h:outputText
 										value="#{Session.displayAuthor.witness.privacity} - " />
 									<h:commandLink value="change"
-										rendered="#{Session.user != null}"
+										rendered="#{Session.canEdit}"
 										actionListener="#{Session.displayAuthor.changePrivacity4Witness}"
 										onclick="if(!confirm('Do you really want to change the privacity of this witness?')){ return; };" />
 								</h:panelGrid>
 
 								<h:outputText value="Witness ID" />
-								<h:outputText value="#{Session.displayAuthor.selectedWitnessId}" />
+	                            <h:outputLink
+                                    value="#{ApplicationBean1.root}/browse/entityDetails.xhtml?eid=#{Session.displayAuthor.selectedWitnessId}" 
+                                    title="Metadata of the entity">
+    								    <h:outputText value="#{Session.displayAuthor.selectedWitnessId}" />
+							    </h:outputLink>
 
 								<h:outputText value="State" />
 								<h:outputText value="#{Session.displayAuthor.witness.status}" />
--- a/src/main/webapp/search/displayTitle.xhtml	Tue Jul 11 17:44:50 2017 +0200
+++ b/src/main/webapp/search/displayTitle.xhtml	Tue Jul 11 18:24:08 2017 +0200
@@ -26,7 +26,7 @@
 				<h:commandButton value="Edit form"
 					image="#{ApplicationBean1.editImage}" title="Edit This Entity"
 					action="#{Session.displayTitle.actionEditTitle}"
-					rendered="#{Session.user != null}" />
+					rendered="#{Session.canEdit}" />
 
 
 				<h:panelGrid columns="2" styleClass="displayPanel"
@@ -35,13 +35,17 @@
 					<h:outputText value="Permission" />
 					<h:panelGrid columns="2">
 						<h:outputText value="#{Session.displayTitle.title.privacity} - " />
-						<h:commandLink value="change" rendered="#{Session.user != null}"
+						<h:commandLink value="change" rendered="#{Session.canEdit}"
 							actionListener="#{Session.displayTitle.changePrivacity4Title}"
 							onclick="if(!confirm('Do you really want to change the privacity of this title?')){ return; };" />
 					</h:panelGrid>
 
 					<h:outputText value="Title ID" />
-					<h:outputText value="#{Session.displayTitle.selectedTitleId}" />
+                    <h:outputLink
+                        value="#{ApplicationBean1.root}/browse/entityDetails.xhtml?eid=#{Session.displayAuthor.selectedTitleId}" 
+                        title="Metadata of the entity">
+					   <h:outputText value="#{Session.displayTitle.selectedTitleId}" />
+				   </h:outputLink>
 
 					<h:outputText value="Full title" />
 					<h:outputText value="#{Session.displayTitle.title.fullTitle}" />
@@ -176,7 +180,7 @@
 						styleClass="titlePanel" />
 
 					<h:panelGrid columns="1"
-						rendered="#{(!empty Session.displayTitle.witnessItems) and Session.user != null}">
+						rendered="#{(!empty Session.displayTitle.witnessItems) and Session.canEdit}">
 						<h:commandLink value="Make all public"
 							actionListener="#{Session.displayTitle.listenerMakeAllWitnessesPublic}"
 							onclick="if(!confirm('Do you really want to change the privacity these witnesses?\nThis action can take some minutes.')){ return; };" />
@@ -217,13 +221,17 @@
 						<h:panelGrid columns="2">
 							<h:outputText
 								value="#{Session.displayTitle.witness.privacity} - " />
-							<h:commandLink value="change" rendered="#{Session.user != null}"
+							<h:commandLink value="change" rendered="#{Session.canEdit}"
 								actionListener="#{Session.displayTitle.changePrivacity4Witness}"
 								onclick="if(!confirm('Do you really want to change the privacity of this witness?')){ return; };" />
 						</h:panelGrid>
 
 						<h:outputText value="Witness ID" />
-						<h:outputText value="#{Session.displayTitle.selectedWitnessId}" />
+                        <h:outputLink
+                             value="#{ApplicationBean1.root}/browse/entityDetails.xhtml?eid=#{Session.displayAuthor.selectedWitnessId}" 
+                             title="Metadata of the entity">
+						    <h:outputText value="#{Session.displayTitle.selectedWitnessId}" />
+					    </h:outputLink>
 
 						<h:outputText value="State" />
 						<h:outputText value="#{Session.displayTitle.witness.status}" />