OSDN Git Service

28dcfb9a2efa0c6c21c929ee15ee83d777231769
[karesansui/karesansui.git] / karesansui / templates / default / hostby1updaterby1 / hostby1updaterby1.part
1 <%doc>Copyright (C) 2009-2010 HDE, Inc.</%doc>
2 <%inherit file="../include/common.part" />
3
4 <%!
5 from karesansui.lib.template import view_autounit, view_megaunit
6 from karesansui.lib.const import DEFAULT_DECIMAL_POINT
7
8 def time_format(text):
9     import time
10     import types
11     if type(text) == types.FloatType  or \
12        type(text) == types.IntType    or \
13        type(text) == types.StringType or \
14        type(text) == types.UnicodeType:
15         return time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(float(text)))
16     else:
17         return "unknown"
18 %>
19
20 <% pkg = rpm_detail[pkg_name] %>
21
22 <div id="updater_detail_display">
23     <table class="detail-contents">
24         <tr>
25             <th>${_('General Information')}</th>
26             <td class="detail-separator">
27                 <img src="${ctx.homepath}/static/images/table-space.gif">
28             </td>
29             <td>
30                 <table cellspacing="0" class="border detail-sub-contents">
31                     <tr>
32                         <th>${_('Name')}</th>
33                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
34                         <td><pre>${pkg['name'] | h}</pre></td>
35                     </tr>
36                     <tr>
37                         <th>${_('Version')}</th>
38                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
39                         <td><pre>${pkg['version'] | h}</pre></td>
40                     </tr>
41                     <tr>
42                         <th>${_('Release')}</th>
43                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
44                         <td><pre>${pkg['release'] | h}</pre></td>
45                     </tr>
46                     <tr>
47                         <th>${_('Summary')}</th>
48                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
49                         <td><pre>${pkg['summary'] | h}</pre></td>
50                     </tr>
51                     <tr>
52                         <th>${_('Arch')}</th>
53                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
54                         <td><pre>${pkg['arch'] | h}</pre></td>
55                     </tr>
56                     <tr>
57                         <th>${_('URL')}</th>
58                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
59                         <td><pre>${pkg['url'] | h}</pre></td>
60                     </tr>
61                     <tr>
62                         <th>${_('License')}</th>
63                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
64                         <td><pre>${pkg['license'] | h}</pre></td>
65                     </tr>
66                     <tr>
67                         <th>${_('Vendor')}</th>
68                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
69                         <td><pre>${pkg['vendor'] | h}</pre></td>
70                     </tr>
71                     <tr>
72                         <th>${_('Group')}</th>
73                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
74                         <td><pre>${pkg['group'] | h}</pre></td>
75                     </tr>
76                 </table>
77             </td>
78         </tr>
79
80         <tr><td colspan='3'><div class='detail-space'/></td></tr>
81
82         <tr>
83             <th>${_('Details')}</th>
84             <td class="detail-separator">
85                 <img src="${ctx.homepath}/static/images/table-space.gif">
86             </td>
87             <td>
88                 <table cellspacing="0" class="border detail-sub-contents">
89                     <tr>
90                         <th>${_('Size')}&nbsp;(B)</th>
91                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
92                         <td><span>${pkg['size'] | h}</span><span class="dark-text autounit">(${view_autounit(pkg['size'], decimal_point=DEFAULT_DECIMAL_POINT, print_unit=True)})</span></td>
93                     </tr>
94                     <tr>
95                         <th>${_('Build Host')}</th>
96                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
97                         <td><pre>${pkg['buildhost'] | h}</pre></td>
98                     </tr>
99                     <tr>
100                         <th>${_('OS')}</th>
101                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
102                         <td><pre>${pkg['os'] | h}</pre></td>
103                     </tr>
104                     <tr>
105                         <th>${_('Description')}</th>
106                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
107                         <td><pre>${pkg['description'] | h}</pre></td>
108                     </tr>
109                     <tr>
110                         <th>${_('Build Date')}</th>
111                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
112                         <td><pre>${pkg['buildtime'] | time_format}</pre></td>
113                     </tr>
114                     <tr>
115                         <th>${_('Install Date')}</th>
116                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
117                         <td><pre>${pkg['installtime'] | time_format}</pre></td>
118                     </tr>
119                     <tr>
120                         <th>${_('Requires')}</th>
121                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
122                         <td>
123 % for require in pkg['requires']:
124                             <pre>${require | h}</pre>
125 % endfor
126                         </td>
127                     </tr>
128                     <tr>
129                         <th>${_('Packager')}</th>
130                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
131                         <td>
132 % for package in pkg['packager']:
133                             ${package | h}
134 % endfor
135                         </td>
136                     </tr>
137                 </table>
138             </td>
139         </tr>
140     </table>
141 </div>