Merge pull request #4344 from owncloud/appmgmt-in-navigation

show 'More apps' link to app administration directly in app navigation
This commit is contained in:
Jan-Christoph Borchardt 2013-08-09 08:49:41 -07:00
commit 4c0ec974b9
6 changed files with 40 additions and 17 deletions

View File

@ -484,6 +484,10 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; }
}
#navigation li:first-child a { padding-top:16px; }
#apps-management {
opacity: .6;
}
/* USER MENU */
#settings { float:right; margin-top:7px; color:#bbb; text-shadow:0 -1px 0 #000; }

View File

@ -89,6 +89,19 @@
</a>
</li>
<?php endforeach; ?>
<!-- show "More apps" link to app administration directly in app navigation -->
<?php if(OC_User::isAdminUser(OC_User::getUser())): ?>
<li id="apps-management">
<a href="<?php print_unescaped(OC_Helper::linkToRoute('settings_apps').'?installed'); ?>" title=""
<?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
<img class="icon svg" src="<?php print_unescaped(OC_Helper::imagePath('settings', 'apps.svg')); ?>"/>
<span>
<?php p($l->t('More apps')); ?>
</span>
</a>
</li>
<?php endif; ?>
</ul>
</div></nav>

View File

@ -401,15 +401,7 @@ class OC_App{
// if the user is an admin
if(OC_User::isAdminUser(OC_User::getUser())) {
// admin apps menu
$settings[] = array(
"id" => "core_apps",
"order" => 3,
"href" => OC_Helper::linkToRoute( "settings_apps" ).'?installed',
"name" => $l->t("Apps"),
"icon" => OC_Helper::imagePath( "settings", "apps.svg" )
);
// admin settings
$settings[]=array(
"id" => "admin",
"order" => 1000,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 259 B

View File

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<rect style="color:#000000" fill-opacity="0" height="97.986" width="163.31" y="-32.993" x="-62.897"/>
<g>
<path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m2 2v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm8 0v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm-8 7v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm8 0v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm1 1h2v2h-2v-2z"/>
<path style="block-progression:tb;text-indent:0;color:#000000;text-transform:none" d="m2 3v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm8 0v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm-8 7v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm8 0v0.5 3 0.5h0.5 3 0.5v-0.5-3-0.5h-0.5-3-0.5zm1 1h2v2h-2v-2z" fill="#fff"/>
</g>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs></defs>
<path fill="#000" d="m14,5,0,8-8,0,0,4,8,0,0,8,4,0,0-8,8,0,0-4-8,0,0-8-4,0z"/>
<path fill="#FFF" d="M14,6v8h-8v4h8v8h4v-8h8v-4h-8v-8h-4z"/>
<path opacity="0.1" d="m14,7,0,8-8,0,0,4,8,0,0,8,4,0,0-8,8,0,0-4-8,0,0-8-4,0z" fill="#FFF"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 795 B

View File

@ -152,7 +152,13 @@ OC.Settings.Apps = OC.Settings.Apps || {
a.prepend(filename);
a.prepend(img);
li.append(a);
container.append(li);
// prepend the new app before the 'More apps' function
$('#apps-management').before(li);
// scroll the app navigation down so the newly added app is seen
$('#navigation').animate({ scrollTop: $('#apps').height() }, 'slow');
// draw attention to the newly added app entry by flashing it twice
container.children('li[data-id="'+entry.id+'"]').animate({opacity:.3}).animate({opacity:1}).animate({opacity:.3}).animate({opacity:1});
if (!SVGSupport() && entry.icon.match(/\.svg$/i)) {
$(img).addClass('svg');
replaceSVG();