You are here

function asset_wizard_location_bar in Asset 5

Same name and namespace in other branches
  1. 6 asset_wizard.inc \asset_wizard_location_bar()
  2. 6 inc/asset_wizard.inc \asset_wizard_location_bar()

File

./asset_wizard.inc, line 851

Code

function asset_wizard_location_bar($dir = '') {
  global $user;
  $defaults = array_unique(array(
    $dir,
    'PUBLIC',
    $user->name,
  ));
  $qstr = $_GET;
  unset($qstr['q']);
  foreach ($defaults as $path) {
    $info = asset_pathinfo($path);
    $asset = asset_load(array(
      'dirname' => $info['dirname'],
      'filename' => $info['filename'],
    ));
    $qstr['dir'] = $asset->filepath;
    $links[] = l($asset->title, $_GET['q'], array(), asset_build_query($qstr));
  }
  return theme('item_list', $links);
}