/
view.phtml
228 lines (220 loc) · 9.67 KB
/
view.phtml
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
<?php
/*=========================================================================
MIDAS Server
Copyright (c) Kitware SAS. 20 rue de la Villette. All rights reserved.
69328 Lyon, FRANCE.
See Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jquery.jqplot.min.js');
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jqplot/jqplot.barRenderer.min.js');
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jqplot/jqplot.categoryAxisRenderer.min.js');
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jqplot/jqplot.pointLabels.min.js');
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jquery.autogrow-textarea.js');
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jquery.form.js');
$this->headScript()->appendFile($this->moduleWebroot.'/public/js/common/common.js');
$this->headScript()->appendFile($this->moduleWebroot.'/public/js/extension/extension.view.js');
$this->headScript()->appendFile($this->moduleWebroot.'/public/js/lightbox/jquery.lightbox-0.5.pack.js');
$this->headScript()->appendFile($this->moduleWebroot.'/public/js/imgliquid/imgLiquid-min.js');
$this->headScript()->appendFile($this->webroot.'/modules/ratings/public/js/star_rating/jquery.ui.stars.min.js');
$this->headScript()->appendFile($this->webroot.'/modules/ratings/public/js/common/common.ratings.js');
$this->headScript()->appendFile($this->webroot.'/modules/comments/public/js/item/item.comments.js');
?>
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/common/common.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/extension/extension.view.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/lightbox/jquery.lightbox-0.5.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/imgliquid/imgLiquid.js.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/layout/jquery.qtip.min.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/layout/jquery-ui.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/jquery/jquery.jqplot.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->webroot?>/modules/ratings/public/css/star_rating/jquery.ui.stars.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->webroot?>/modules/comments/public/css/item/item.comments.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->webroot?>/modules/ratings/public/css/item/item.ratings.css" />
<div class="category">
<span id="categoryBreadcrumb">
<a id="rootBreadcrumb" class="breadcrumbLink" href="">Slicer Extensions</a>
</span>
</div>
<div id="container_main">
<div id="extension_banner">
<div class="title">
<div class="extension_title"><?php echo $this->extension->getProductname()?></div>
<div class="group_title">
<?php echo $this->extension->getContributors() ?>
</div>
</div>
<div class="button_bar">
<!--
<img qtip="+1 on Google+" src="<?php echo $this->moduleWebroot?>/public/images/googleplus.png" width="32" height="32" class="googlePlus"/>
<img qtip="Tweet this" src="<?php echo $this->moduleWebroot?>/public/images/twitter.png" width="32" height="32" class="twitter"/>
<img qtip="Like on Facebook" src="<?php echo $this->moduleWebroot?>/public/images/LikeButton.png" width="78" height="32" class="facebook" />
-->
<?php if($this->logged) { ?>
<div class="logoutDiv"><a href="javascript:;" id="logoutLink">Logout</a></div>
<?php } ?>
</div>
</div>
<div class="left_column">
<div class="icon_art">
<img src="<?php echo $this->icon ?>" width="128" height="128" />
</div>
<div class="extensionActionButtonWrapper">
<input type="button" class="extensionActionButton" value=""/>
</div>
<div class="info_list">
<div class="info_item">
Created <?php echo date('F j, Y', strtotime($this->extension->getItem()->getDateCreation())); ?>
</div>
<?php
if($this->extension->getRepositoryUrl())
{
$revision = $this->extension->getRevision();
if(strtolower($this->extension->getRepositoryType()) == 'git')
{
$revision = substr($revision, 0, 8);
}
?>
<div class="info_item">
Revision <?php echo $revision; ?>
</div>
<?php
}
?>
<div class="info_item">
<?php echo UtilityComponent::formatSize($this->extension->getItem()->getSizebytes()); ?>
</div>
<div class="info_item">
<?php echo $this->extension->getItem()->getDownload() ?> downloads
</div>
<div class="info_item">
<a id="viewUrl">View URL</a>
<div id="dialogUrl" title="Extension: <?php echo $this->extension->getProductname()?>" style="display: none;">
<p>
The following URL points to the extension details page (for the Slicer <?php
echo $this->extension->getSlicerRevision();
echo ' ';
echo $this->extension->getArch();
echo ' ';
echo $this->extension->getOs();
?> build). This URL will remain unchanged, allowing you to share it.
</p>
<div style="width: 100%; position: relative; margin: 0; padding: 0;">
<input
style="position: absolute; left: 0; right: 0; width: -moz-calc(100% - 14px);"
class="extensionField"
type="text"
value="<?php echo UtilityComponent::getServerURL().$this->webroot?>/slicerappstore/extension/view?extensionId=<?php echo $this->extension->getKey()?>"
readonly>
</div>
</div>
</div>
</div>
<div class="rating_area">
<?php echo $this->element('rating', 'ratings'); ?>
</div>
<div class="rating_scale">
</div>
</div>
<div class="right_content">
<div class="content_header">
Description
</div>
<div class="description">
<?php echo htmlentities($this->extension->getDescription()) ?>
</div>
<?php
if($this->extension->getHomepage() || $this->extension->getRepositoryUrl())
{ ?>
<div class="content_header">
Links
</div>
<div class="links">
<?php
if($this->extension->getHomepage())
{
echo '<div class="homepageContainer"><a target="_blank" href="'.$this->extension->getHomepage().'">';
echo '<img alt="" src="'.$this->moduleWebroot.'/public/images/house_link.png" /> ';
echo 'View home page</a></div>';
}
if($this->extension->getRepositoryUrl())
{
switch(strtolower($this->extension->getRepositoryType()))
{
case 'git':
$icon = 'git';
break;
case 'svn':
$icon = 'svn';
break;
default:
$icon = 'default';
break;
}
echo '<div class="repoLinkContainer"><a target="_blank" href="'.$this->extension->getRepositoryUrl().'">';
echo '<img alt="" src="'.$this->moduleWebroot.'/public/images/repo/'.$icon.'.png" /> ';
echo 'View source code</a></div>';
}
?>
</div>
<?php
} ?>
<div class="content_header">
Screenshots
</div>
<div class="screenshots">
</div>
<div class="content_header">
User Comments
</div>
<div class="reviews">
<?php echo $this->element('comment', 'comments'); ?>
</div>
</div>
</div>
<!-- TEMPLATE: Screenshot -->
<div style="display: none;" class="screenshotContainer" id="screenshotTemplate">
<a class="screenshotPreview" href="">
<img class="screenshotPreview" alt="" src="" />
</a>
</div>
<?php
if($this->layout == 'empty')
{ ?>
<!-- TEMPLATE: login form -->
<div id="loginFormTemplate" style="display:none;">
<div class="loginError">
</div>
<form class="loginForm dialogForm" method="POST" action="<?php echo $this->webroot?>/user/ajaxlogin">
<table>
<tr><td>E-mail</td><td><input name="email" type="text" /></td></tr>
<tr><td>Password</td><td><input name="password" type="password" /></td></tr>
<tr><td></td><td><input type="submit" value="Login" /></td></tr>
</table>
</form>
<div>
Not registered? <a class="registerLink" href="javascript:;">Register</a>
</div>
</div>
<!-- TEMPLATE: register form -->
<div id="registerFormTemplate" style="display:none;">
<div class="registerError">
</div>
<form class="registerForm dialogForm" method="POST" action="<?php echo $this->webroot?>/user/ajaxregister">
<table>
<tr><td>E-mail</td><td><input name="email" type="text" /></td></tr>
<tr><td>First Name</td><td><input name="firstname" type="text" /></td></tr>
<tr><td>Last Name</td><td><input name="lastname" type="text" /></td></tr>
<tr><td>Password</td><td><input name="password1" type="password" /></td></tr>
<tr><td>Confirm Password</td><td><input name="password2" type="password" /></td></tr>
<tr><td></td><td><input type="submit" value="Register" /></td></tr>
</table>
</form>
<div>
Already registered? <a class="loginLink" href="javascript:;">Login</a>
</div>
</div>
<?php
}
?>