summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
blob: d562d2ad620972463ff8e19e2a15970883ee8f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<g:hiddenField id="infoAbsPath" name="absolutePath"
	value="${dataObject.absolutePath}" />

<div id="infoMessageArea">
	<!--  -->
</div>
<div id="idropLiteArea">
	<!--  area to show idrop lite applet -->
</div>
<div id="toggleHtmlArea">
	<div id="displayArea">
		<g:render template="/browse/dataObjectInfoToolbar" />
		<div id="infoDialogArea"><!--  no empty divs --></div>
	
			<div class="well">
			<image style="float:left;margin-right:10px;" src="<g:resource dir='images' file='file.png' alt='file icon' />"/>
			
				<div id="container" style="height:100%;width:100%;">
				
						<div >
					<div><label><g:message code="text.file.name" />:</label></div>
                                        <div style="overflow:auto;"><a href="#" onclick="dibDownloadFile( )">${dataObject.dataName}</a></div>
				</div>
				<div>
					<div style="width:20%;"><label><g:message code="text.parent" />:</label></div>
					<div style="overflow:auto;">${dataObject.collectionName}</div>
				</div>
				</div>
				<div id="infoThumbnailLoadArea"></div>
					<g:if test="${renderMedia}">
						<a class="media" href="${resource(absolute:true,dir:'file/download',file:dataObject.absolutePath)}"></a>
					</g:if>
					<g:else>
						<a href="${resource(absolute:true,dir:'file/download',file:dataObject.absolutePath)}"></a>
					</g:else>
				</div>
			</div>
		</div>
		
	<ul class="nav nav-tabs" id="infoTabs">
	  <li class="active"><a href="#info" id="infoTab"><g:message code="text.info" /></a></li>
	  <li><a href="#metadata" id="metadataTab"><g:message code="text.metadata" /></a></li>
	  <li><a href="#permissions" id="permissionTab"><g:message code="text.permissions" /></a></li>
	  <g:if test="${grailsApplication.config.idrop.config.use.tickets==true}">
	  	<li><a href="#tickets" id="ticketTab"><g:message code="text.tickets" /></a></li>
	  </g:if>
	  <li><a href="#audit"  id="auditTab"><g:message code="text.audit" /></a></li>
	</ul>
	
	<div class="tab-content">
  		<div class="tab-pane active" id="info">
  			<div id="container" style="height:100%;width:100%;">
		
				<div >
					<div style="width:20%;"><label><g:message code="text.length" />:</label></div>
					<div>${dataObject.displayDataSize}</div>
				</div>
				
				<div>
					<div><label><g:message code="text.created" />:</label></div>
					<div>${dataObject.createdAt}</div>
				</div>
				<div>
					<div><label><g:message code="text.modified" />:</label></div>
					<div>${dataObject.updatedAt}</div>
				</div>
				<div>
					<div><label><g:message code="text.owner" />:</label></div>
					<div>${dataObject.dataOwnerName}</div>
				</div>
				<div>
					<div><label><g:message code="text.owner.zone" />:</label></div>
					<div>${dataObject.dataOwnerZone}</div>
				</div>
				<div>
					<div><label><g:message code="text.data.path" />:</label></div>
					<div style="overflow:auto;"><span class="longText">${dataObject.dataPath}</span></div>
				</div>
				<div>
					<div><label><g:message code="text.resource.group" />:</label></div>
					<div>${dataObject.resourceGroupName}</div>
				</div>
				<div>
					<div><label><g:message code="text.checksum" />:</label></div>
					<div>${dataObject.checksum}</div>
				</div>
				<div>
					<div><label><g:message code="text.resource" />:</label></div>
					<div>${dataObject.resourceName}</div>
				</div>
				<div>
					<div><label><g:message code="text.replica.number" />:</label></div>
					<div>${dataObject.dataReplicationNumber}</div>
				</div>
				<div>
					<div><label><g:message code="text.replication.status" />:</label></div>
					<div>${dataObject.replicationStatus}</div>
				</div>
				<div>
					<div><label><g:message code="text.status" />:</label></div>
					<div>${dataObject.dataStatus}</div>
				</div>
				<div>
					<div><label><g:message code="text.type" />:</label></div>
					<div>${dataObject.dataTypeName}</div>
				</div>
				<div>
					<div><label><g:message code="text.version" />:</label></div>
					<div>${dataObject.dataVersion}</div>
				</div>
		
		</div>
		<div id="container" style="height:100%;width:100%;">
				<div>
					<div><label><g:message code="text.tags" />:</label></div>
					<div><g:textField id="infoTags" name="tags"
					value="${tags.spaceDelimitedTagsForDomain}" /></div>
				</div>
				<div>
					<div><label><g:message code="text.comment" />:</label></div>
					<div><g:textArea id="infoComment" name="comment" rows="5" cols="80"
					value="${comment}" /></div>
				</div>
				<div>
					<div></div>
					<div><button type="button" id="updateTags" value="updateTags" onclick="updateTags()">Update Tags</button></div>
				</div>
		</div>
	</div>
	<div class="tab-pane" id="metadata">
  	<div id="infoAccordionMetadataInner"></div>
  </div>
  <div class="tab-pane" id="permissions">
  	<div id="infoAccordionACLInner"></div>
  </div>
  <g:if test="${grailsApplication.config.idrop.config.use.tickets==true}">
	  <div class="tab-pane" id="tickets">
	   			<div id="infoAccordionTicketsInner">
				</div>
		</div>
	</g:if>
   <div class="tab-pane" id="audit">
   	<div id="infoAccordionAuditInner"></div>
   </div>
</div>

</div><!--  toggle html area -->
		
<script>
	$(function() {
		$(".idropLiteBulkUpload").hide();
		$("#menuDownload").show();
		$("#menuUpload").hide();
		$("#menuBulkUpload").hide();


		$('#infoTabs a').click(function (e) {
			  e.preventDefault();
			  $(this).tab('show');
		});
		
		$('#infoTab').on('shown', function (e) {
			//e.target // activated tab
			//e.relatedTarget // previous tab
			showMetadataView(selectedPath, "#infoAccordionMetadataInner");
		});
		
		$('#metadataTab').on('shown', function (e) {
			showMetadataView(selectedPath, "#infoAccordionMetadataInner");
		});

		$('#permissionTab').on('shown', function (e) {
			showSharingView(selectedPath, "#infoAccordionACLInner");
		});

		$('#ticketTab').on('shown', function (e) {
			showTicketView(selectedPath, "#infoAccordionTicketsInner");
		});

		$('#auditTab').on('shown', function (e) {
			showAuditView(selectedPath, "#infoAccordionAuditInner"); 
		});
			
	});

	function callUpdateTags() {
		updateTags();
	}

	/*
		

		$("#infoAccordion").accordion({
			clearStyle : true,
			autoHeight : false
		}).bind("accordionchange", function(event, ui) {
			var infoSection = ui.newHeader[0].id;
			updateDataObjectInfoSection(infoSection);
		});
		*/

	/**
	Update the info for a section in the info accordion based on the provided section id
	 */
	function updateDataObjectInfoSection(sectionToUpdate) {
		//alert("sectionToUpdate:" + sectionToUpdate);
		if (sectionToUpdate == "infoAccordionMetadata") {
			showMetadataView(selectedPath, "#infoAccordionMetadataInner");
		} else if (sectionToUpdate == "infoAccordionACL") {
			showSharingView(selectedPath, "#infoAccordionACLInner");
		} else if (sectionToUpdate == "infoAccordionTickets") {
			showTicketView(selectedPath, "#infoAccordionTicketsInner");
		} else if (sectionToUpdate == "infoAccordionAudit") {
			showAuditView(selectedPath, "#infoAccordionAuditInner");
		} else {
		}
	}
</script>
<g:if test="${getThumbnail}">
	<script>
		$(function() {
			requestThumbnailImageForInfoPane();
		});
	</script>
</g:if>
<g:else>
<script>
	$(function() {
		//$.fn.media.mapFormat('pdf', 'quicktime');
		$('.media').media({
			width : 300,
			height : 200,
			autoplay : true
		});

	});
</script>
</g:else>