0d289790efa228f8cae9c6f8c76c26ca5f70e7ee
[Evergreen.git] / Evergreen / staff_client / chrome / content / evergreen / cat / brief.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Cataloger's Search Result Screen -->
4
5 <!-- Stylesheets -->
6 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
7 <?xml-stylesheet href="chrome://evergreen/skin/evergreen.css" type="text/css"?>
8 <?xml-stylesheet href="chrome://evergreen/skin/cat.css" type="text/css"?>
9
10 <!-- Localization -->
11 <!DOCTYPE window SYSTEM "chrome://evergreen/locale/cat.dtd">
12
13 <window id="brief_win" title="Record Details" 
14         orient="vertical" style="overflow: scroll" width="800" height="500"
15         onload="my_init();"
16         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
17
18         <!-- Overlays for this XUL file -->
19         <?xul-overlay href="chrome://evergreen/content/util/util_overlay.xul"?>
20
21         <script>
22         <![CDATA[
23                 var myPackageDir = "evergreen";
24
25                 function my_init() {
26
27                         var mods = user_request(
28                                 'open-ils.search',
29                                 'open-ils.search.biblio.record.mods_slim.retrieve',
30                                 [ find_this_id ]
31                         )[0];
32
33                         document.getElementById('title').setAttribute('value',mods.title());
34                         document.getElementById('author').setAttribute('value',mods.author());
35                         var s = '';
36                         if (mods.edition()) s = mods.edition();
37                         if (mods.pubdate()) s += ' ' + mods.pubdate();
38                         document.getElementById('edition').setAttribute('value',s);
39                         document.getElementById('tcn').setAttribute('value',mods.tcn());
40
41                         user_request(
42                                 'open-ils.cat',
43                                 'open-ils.cat.biblio.record.metadata.retrieve',
44                                 [ find_this_id ],
45                                 function (req) {
46                                         var meta = req.getResultObject()[0];
47                                         document.getElementById('creator').setAttribute('value',meta.creator());
48                                         document.getElementById('editor').setAttribute('value',meta.editor());
49                                         document.getElementById('edit_date').setAttribute('value',formatted_date(meta.edit_date(),"%D"));
50                                 }
51                         );
52                 }
53
54         ]]>
55         </script>
56
57         <groupbox flex="1">
58                 <caption label="Record Details"/>
59                 <hbox flex="1">
60                         <label style="font-weight: bold;" value="Title:" /><label id="title" /> 
61                         <label style="font-weight: bold;" value="Author:" /><label id="author" />
62                         <label style="font-weight: bold;" value="Edition:" /> <label id="edition" />
63                 </hbox>
64                 <hbox flex="1">
65                         <label style="font-weight: bold;" value="TCN:" /> <label id="tcn" />
66                         <label style="font-weight: bold;" value="Created By:" /> <label id="creator" />
67                         <label style="font-weight: bold;" value="Last Edited By:" /> <label id="editor" />
68                         <label style="font-weight: bold;" value="Last Edited On:" /> <label id="edit_date" />
69                 </hbox>
70         </groupbox>
71
72 </window>
73