Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 20a10fe

Browse files
author
Charles Marion
committed
ENH: Added Back buttons
Fixed pathBrowser css refs #135
1 parent cb29547 commit 20a10fe

File tree

10 files changed

+96
-18
lines changed

10 files changed

+96
-18
lines changed

core/controllers/ItemController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,11 @@ function viewAction()
130130
}
131131

132132
$items = array();
133+
$this->view->backUploaded = false;
134+
$this->view->currentFolder = false;
133135
if(isset($this->userSession->uploaded) && in_array($itemDao->getKey(), $this->userSession->uploaded))
134136
{
137+
$this->view->backUploaded = true;
135138
$items = $this->Item->load($this->userSession->uploaded);
136139
}
137140
else
@@ -150,9 +153,9 @@ function viewAction()
150153
if(isset($currentFolder))
151154
{
152155
$items = $this->Folder->getItemsFiltered($currentFolder, $this->userSession->Dao, MIDAS_POLICY_READ);
156+
$this->view->currentFolder = $currentFolder;
153157
}
154158
}
155-
156159
}
157160

158161
foreach($items as $key => $item)

core/public/css/common/common.browser.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
}*/
55

66
ul.pathBrowser{
7+
padding-top: 3px;
78
display: block;
89
list-style-type: disc;
910
margin: 0px;

core/public/images/icons/back.png

795 Bytes
Loading

core/views/community/manage.phtml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/common/common.bro
3434
?>
3535
</div>
3636
<div class="genericInfo">
37+
<div class ="genericWrapperTopRight">
38+
39+
<?php
40+
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
41+
echo "<a href='{$this->webroot}/community/{$this->communityDao->getKey()}'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
42+
echo $this->t('Back');
43+
echo "</a>";
44+
echo '</div>';
45+
46+
?>
47+
</div>
3748
<div class="genericName"><?php echo $this->communityDao->getName();?></div>
3849
</div>
3950
<img class="tabsLoading" alt="" src="<?php echo $this->coreWebroot?>/public/images/icons/loading.gif" />

core/views/community/view.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/common/common.bro
3939
?>
4040
<div class="genericBigButton genericWrapperTopRight">
4141
<form type='post' action=''>
42-
<input name='joinCommunity' type='submit' value='<?php echo $this->t('Join the community') ?>' />
42+
<input style="margin:0px;padding:0px;" name='joinCommunity' type='submit' value='<?php echo $this->t('Join the community') ?>' />
4343
</form>
4444
</div>
4545
<?php } ?>

core/views/import/index.phtml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,26 @@ PURPOSE. See the above copyright notices for more information.
1313
<?php if(isset($this->errormessage)) { echo $this->errormessage; } ?>
1414
<?php if(isset($this->statusmessage)) { echo $this->statusmessage; } ?>
1515

16+
17+
<div class ="genericWrapperTopRight">
18+
<?php
19+
echo '<div style="margin-right:2px;" class="genericBigButton ">';
20+
echo "<a href='{$this->webroot}/admin#tabs-assetstore'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
21+
echo $this->t('Back');
22+
echo "</a>";
23+
echo '</div>';
24+
25+
?>
26+
</div>
27+
<br/>
1628
<?php
1729
$this->headScript()->appendFile($this->coreWebroot.'/public/js/import/import.index.js');
1830
$this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jquery.form.js');
1931

2032
$this->headLink()->appendStylesheet($this->coreWebroot.'/public/css/jquery/jquery.filetree.css');
2133
$this->headLink()->appendStylesheet($this->coreWebroot.'/public/css/import/import.index.css');
2234
$this->headLink()->appendStylesheet($this->coreWebroot.'/public/css/assetstore/assetstore.add.css');
35+
2336

2437
echo $this->importForm;
2538
?>

core/views/item/view.phtml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,46 @@ if($this->preview) // module visualize
2828
?>
2929
</div>
3030
<div class="genericInfo">
31-
<div class="genericBigButton genericWrapperTopRight">
32-
<?php
33-
echo "<a href='{$this->webroot}/download/?items={$this->itemDao->getKey()}'>";
34-
if($this->itemIsLink)
31+
<div class ="genericWrapperTopRight">
32+
<div style="float:right;" class="genericBigButton ">
33+
<?php
34+
echo "<a href='{$this->webroot}/download/?items={$this->itemDao->getKey()}'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/download.png'/>";
35+
if($this->itemIsLink)
36+
{
37+
echo $this->t('View as weblink');
38+
}
39+
else
40+
{
41+
echo $this->t('Download');
42+
}
43+
echo '</a>';
44+
?>
45+
</div>
46+
47+
<?php
48+
if($this->backUploaded)
3549
{
36-
echo $this->t('View as weblink');
50+
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
51+
echo "<a href='{$this->webroot}/browse/uploaded'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
52+
echo $this->t('Back');
53+
echo "</a>";
54+
echo '</div>';
3755
}
38-
else
56+
else if($this->currentFolder)
3957
{
40-
echo $this->t('Download');
58+
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
59+
echo "<a href='{$this->webroot}/folder/{$this->currentFolder->getKey()}'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
60+
echo $this->t('Back');
61+
echo "</a>";
62+
echo '</div>';
4163
}
42-
echo '</a>';
43-
?>
64+
?>
65+
66+
<br/>
67+
<div class="itemStats">
68+
<?php echo $this->itemDao->getView()?> <?php echo $this->t('views'); ?>,
69+
<?php echo $this->itemDao->getDownload()?> <?php echo $this->t('downloads');?></div>
4470
</div>
45-
<div class="itemStats">
46-
<?php echo $this->itemDao->getView()?> <?php echo $this->t('views'); ?>,
47-
<?php echo $this->itemDao->getDownload()?> <?php echo $this->t('downloads');?></div>
4871
<div class="genericName <?php if(strlen($this->itemDao->getName()) > 30) echo "tips";?>" <?php if(strlen($this->itemDao->getName()) > 30) echo "style='cursor:help;' title='".$this->itemDao->getName()."'";?> ><?php echo $this->slicename($this->itemDao->getName(),30); ?></div>
4972
<div class="genericSubtitle" style="color:grey;"><?php echo $this->itemSize;?></div>
5073

core/views/user/manage.phtml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/common/common.bro
3333
?>
3434
</div>
3535
<div class="genericInfo">
36+
<div class ="genericWrapperTopRight">
37+
38+
<?php
39+
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
40+
echo "<a href='{$this->webroot}/user/{$this->user->getKey()}'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
41+
echo $this->t('Back');
42+
echo "</a>";
43+
echo '</div>';
44+
45+
?>
46+
</div>
3647
<div class="genericName"><?php echo $this->user->getFullName();?></div>
3748
<div class="genericSubtitle"><?php echo $this->user->getCompany();?></div>
3849
</div>

modules/api/views/config/index.phtml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ $this->headScript()->appendFile($this->moduleWebroot . '/public/js/config/config
1515
?>
1616
<link type="text/css" rel="stylesheet" href="<?php echo $this->moduleWebroot?>/public/css/config/config.index.css" />
1717
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/common/common.genericPage.css" />
18-
1918
<div class="viewMain">
20-
21-
19+
<div class ="genericWrapperTopRight">
20+
<?php
21+
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
22+
echo "<a href='{$this->webroot}/admin#tabs-modules'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
23+
echo $this->t('Back');
24+
echo "</a>";
25+
echo '</div>';
26+
27+
?>
28+
</div>
2229
<?php
2330
echo "
2431
<form class='genericForm' id='configForm' method='{$this->configForm['method']}' action='{$this->configForm['action']}'>

modules/visualize/views/config/index.phtml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ $this->headScript()->appendFile($this->moduleWebroot . '/public/js/config/config
1818

1919
<div class="viewMain">
2020

21-
21+
<div class ="genericWrapperTopRight">
22+
<?php
23+
echo '<div style="float:right;margin-right:2px;" class="genericBigButton ">';
24+
echo "<a href='{$this->webroot}/admin#tabs-modules'><img style='float:left;margin-right:2px;' alt='' src='{$this->coreWebroot}/public/images/icons/back.png'/>";
25+
echo $this->t('Back');
26+
echo "</a>";
27+
echo '</div>';
28+
29+
?>
30+
</div>
2231
<?php
2332
echo "
2433
<form class='genericForm' id='configForm' method='{$this->configForm['method']}' action='{$this->configForm['action']}'>

0 commit comments

Comments
 (0)