67
67
<ul>
68
68
<li class="first">
69
69
<?php
70
- if ($ this ->logged )
70
+ if ($ this ->logged && isset ( $ this -> userDao ) )
71
71
{
72
72
echo '
73
73
<b><a id="topUserName" href=" ' .$ this ->webroot .'/user/ ' .$ this ->userDao ->getUserId ().'" > ' .$ this ->userDao ->getFullName ().' <img class="arrowUser" src=" ' .$ this ->coreWebroot .'/public/images/icons/arrow-user.gif" alt ="" /> </a> </b>
74
74
<ul>
75
75
<li onclick="location.replace( \'' .$ this ->webroot .'/user/userpage \');"><a> ' .$ this ->t ('My Page ' ).'</a></li>
76
76
<li class="myAccountLink"><a> ' .$ this ->t ('My Account ' ).'</a></li>
77
- <li class="modulesLink"><a> ' . $ this -> t ( ' Modules ' ). ' </a></li> ' ;
77
+ ' ;
78
78
if ($ this ->userDao ->isAdmin ())
79
79
{
80
80
echo '
123
123
</div>
124
124
<div class="Header">
125
125
<div class="HeaderContent">
126
-
126
+ Hello Plugin !!!
127
127
<div class="HeaderLogo" onclick="window.location='<?php echo $ this ->webroot ?> ';">
128
- Hello Plugin !!!
129
128
</div>
130
129
<div class="HeaderSearch">
131
130
<input type="text" id="live_search" value="<?= $ this ->t ('Jump to a data, folder... ' ) ?> " autocomplete="off" autocorrect="off" autocapitalize="off" />
132
131
<input type="hidden" id="live_search_value" value="init" />
133
132
<div id="searchloading" style="display:none"></div>
134
- <a id="advancedSearchLink"><?php echo $ this ->t ('Advanced search ' )?> </a>
135
133
</div>
136
134
<div class="HeaderAction">
137
135
<ul>
145
143
</div>
146
144
</div>
147
145
</div>
146
+
148
147
<div class="Wrapper">
148
+ <?php
149
+ if ($ this ->needUpgrade )
150
+ {
151
+ echo '<span style="color:red;">MIDAS need to be upgraded. <a href=" ' .$ this ->webroot .'/admin/#ui-tabs-1">Upgrade</a></span><br/><br/> ' ;
152
+ }
153
+ ?>
149
154
<div class=SubWrapper">
155
+
150
156
<div class="MainContent">
151
157
<div class="SideBar">
152
158
<ul>
153
159
<li <?php if ($ this ->activemenu =='feed ' ) {echo 'class="active" ' ;} ?> onclick="location.replace('<?php echo $ this ->webroot ?> /feed');" ><a href="<?php echo $ this ->webroot ?> /feed"><img alt="" src="<?php echo $ this ->coreWebroot ?> /public/images/icons/feed.png" /><span> <?php echo $ this ->t ('Feed ' );?> </span></a></li>
154
160
<li <?php if ($ this ->activemenu =='browse ' ) {echo 'class="active" ' ;} ?> onclick="location.replace('<?php echo $ this ->webroot ?> /browse');" ><a href="<?php echo $ this ->webroot ?> /browse"><img alt="" src="<?php echo $ this ->coreWebroot ?> /public/images/icons/data.png" /><span> <?php echo $ this ->t ('Data ' );?> </span></a></li>
155
161
<li <?php if ($ this ->activemenu =='community ' ) {echo 'class="active" ' ;} ?> onclick="location.replace('<?php echo $ this ->webroot ?> /community');" ><a href="<?php echo $ this ->webroot ?> /community"><img alt="" src="<?php echo $ this ->coreWebroot ?> /public/images/icons/community.png" /><span> <?php echo $ this ->t ('Communities ' );?> </span></a></li>
156
162
<li id="menuUserInfo" <?php if ($ this ->activemenu =='user ' ) {echo 'class="active" ' ;} ?> ><a href="javascript:;"><img alt="" src="<?php echo $ this ->coreWebroot ?> /public/images/icons/upload.png" /><span> <?php echo $ this ->t ('My Uploads ' );?> </span></a></li>
157
- <li <?php if ($ this ->activemenu =='plugin ' ) {echo 'class="active" ' ;} ?> class="last"><a href="#"><img alt="" src="<?php echo $ this ->coreWebroot ?> /public/images/icons/plugin.png" /><span> <?php echo $ this ->t ('Plugins ' );?> </span></a></li>
158
163
</ul>
159
164
<hr/>
160
165
<?php
165
170
echo '<ul> ' ;
166
171
foreach ($ recentReverse as $ item )
167
172
{
168
- echo "<li onclick= \"location.replace(' {$ this ->webroot }/item/ {$ item ->getKey ()}'); \" class='recentItem' title=' " . str_replace ("' " , '" ' , $ item ->getName ())." | todo'><a href=' {$ this ->webroot }/item/ {$ item ->getKey ()}'> " .sliceRecentItem ($ item ->getName ())."</a></li> " ;
173
+ if (is_array ($ item ))
174
+ {
175
+ echo "<li onclick= \"location.replace(' {$ this ->webroot }/item/ {$ item ['item_id ' ]}'); \" class='recentItem' title=' " . str_replace ("' " , '" ' , $ item ['name ' ])." | todo'><a href=' {$ this ->webroot }/item/ {$ item ['item_id ' ]}'> " .$ this ->slicename ($ item ['name ' ],20 )."</a></li> " ;
176
+ }
169
177
}
170
178
echo '</ul> ' ;
171
179
}
216
224
<?php echo $ this ->json ?>
217
225
</div>
218
226
</body>
219
- </html>
220
-
221
- <?php
222
- function sliceRecentItem ($ name )
223
- {
224
- if (strlen ($ name )>20 )
225
- {
226
- $ name =substr ($ name ,0 , 6 ).'... ' .substr ($ name ,strlen ($ name )-11 );
227
- }
228
- return $ name ;
229
- }
230
- ?>
227
+ </html>
0 commit comments