forked from ArctosDB/arctos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContDet.cfm
135 lines (133 loc) · 4.6 KB
/
ContDet.cfm
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
<cfif not isdefined("container_id")>
<cfabort><!--- need an ID to do anything --->
</cfif>
<cfquery name="detail" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
SELECT
flat.collection_object_id,
container.container_id,
container_type,
label,
description,
container_remarks,
container.barcode,
part_name,
guid,
scientific_name,
concatSingleOtherId(flat.collection_object_id,'#session.CustomOtherIdentifier#') AS CustomID,
container.parent_install_date,
container.WIDTH,
container.HEIGHT,
container.length,
container.INSTITUTION_ACRONYM,
container.NUMBER_ROWS,
NUMBER_COLUMNS,
ORIENTATION,
POSITIONS_HOLD_CONTAINER_TYPE
FROM
container,
flat,
specimen_part,
coll_obj_cont_hist
WHERE container.container_id = coll_obj_cont_hist.container_id (+) AND
coll_obj_cont_hist.collection_object_id = specimen_part.collection_object_id (+) AND
specimen_part.derived_from_cat_item = flat.collection_object_id (+) AND
container.container_id=#container_id#
</cfquery>
<h2>Container Details</h2>
<cfoutput>
<div>
<div>Container Type: #detail.container_type#</div>
<cfif len(detail.barcode) gt 0>
<div>Barcode: #detail.barcode#</div>
</cfif>
<cfif detail.barcode neq detail.label>
<div style="color:red;">Label: #detail.label#</div>
<cfelse>
<div>Label: #detail.label#</div>
</cfif>
<cfif len(detail.description) gt 0>
<div>Description: #detail.description#</div>
</cfif>
<cfif len(detail.container_remarks) gt 0>
<div>Remarks: #detail.container_remarks#</div>
</cfif>
<cfif len(detail.parent_install_date) gt 0>
<div>Install Date: #dateformat(detail.parent_install_date,"yyyy-mm-dd")#T#timeformat(detail.parent_install_date,"hh:mm:ss")#</div>
</cfif>
<cfif len(detail.WIDTH) gt 0 OR len(detail.HEIGHT) gt 0 OR len(detail.length) gt 0>
<div>Dimensions (W x H x D): #detail.WIDTH# x #detail.HEIGHT# x #detail.length# CM</div>
</cfif>
<cfif len(detail.INSTITUTION_ACRONYM) gt 0>
<div>Institution: #detail.INSTITUTION_ACRONYM#</div>
</cfif>
<cfif len(detail.POSITIONS_HOLD_CONTAINER_TYPE) gt 0>
<div>Position Layout: #detail.NUMBER_ROWS# rows, #detail.NUMBER_COLUMNS# columns, #detail.ORIENTATION#, holds #detail.POSITIONS_HOLD_CONTAINER_TYPE#</div>
</cfif>
<cfif len(detail.part_name) gt 0>
<div>
Part: <a href="/guid/#detail.guid#" target="_blank" class="external">#detail.guid#</a>
<em>#detail.scientific_name#</em> #detail.part_name#
<cfif len(detail.CustomID) gt 0>
(#session.CustomOtherIdentifier#: #detail.CustomID#)
</cfif>
</div>
</cfif>
<div>
<a href="EditContainer.cfm?container_id=#container_id#" class="external" target="_blank">Edit this container</a>
</div>
<div>
<a href="allContainerLeafNodes.cfm?container_id=#container_id#" class="external" target="_blank">
See all collection objects in this container
</a>
</div>
<div>
<a href="/containerPositions.cfm?container_id=#container_id#" class="external" target="_blank">Positions</a>
</div>
<div>
<a href="javascript:void(0)" onClick="getHistory('#container_id#'); return false;">History</a>
</div>
<cfquery name="posn" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
SELECT
CONTAINER_ID,
level,
getLastContainerEnvironment(CONTAINER_ID) lastenv,
--nvl(PARENT_CONTAINER_ID,0) PARENT_CONTAINER_ID,
CONTAINER_TYPE,
--DESCRIPTION,
--PARENT_INSTALL_DATE,
--CONTAINER_REMARKS,
label,
barcode
--, SYS_CONNECT_BY_PATH(container_type,':') thepath
from container
start with container_id=#container_id#
connect by prior
parent_container_id = container_id
order by
level desc
</cfquery>
<div>
Location:
<cfset indent=0>
<cfloop query="posn">
<cfset indent=indent+.5>
<div style="margin-left: #indent#em; border:1px lightgray dotted;">
<span class="likeLink" onclick="checkHandler(#container_id#)">#label#</span>
<div style="margin-left:.4em;font-size:smaller;">
<div>Container Type: #CONTAINER_TYPE#</div>
<cfif len(barcode) gt 0>
<cfif barcode neq label>
<div style="color:red;">Barcode: #barcode#</div>
<cfelse>
<div>Barcode: #barcode#</div>
</cfif>
</cfif>
<cfif len(lastenv) gt 0>
<div>Last Envo: #lastenv#</div>
</cfif>
</div>
</div>
</cfloop>
</div>
</div>
</cfoutput>