Exemplo n.º 1
0
function create_list_item($child)
{
    $id = slug($child->label);
    switch ($child->type) {
        // case 'region-monde': return '';
        case 'pays':
            // return start_table('h3')."<tr><th class='h3' colspan='2'>$child->label</th></tr>";
            return $child->category == 1 && ($child->label == "Italie" || $child->label == "Canada") ? start_table('h3 breaker') . "<tr><th class='h3' colspan='2'>{$child->label}</th></tr>" : start_table('h3') . "<tr><th class='h3' colspan='2'>{$child->label}</th></tr>";
        case 'region':
            return start_table('h4') . "<tr><th class='h4' colspan='2'>{$child->label}</th></tr>";
        case 'sous-region':
            return start_table('h5') . "<tr><th class='h5' colspan='2'>{$child->label}</th></tr>";
        case 'promo':
            return create_promo_wines($child->id);
        case 'vins-au-verre':
            return print_vins_au_verre($child->id);
        case 'demi-bouteilles':
            return print_demi_bouteilles($child->id);
        default:
            return '';
    }
}
Exemplo n.º 2
0
function create_list_item($child)
{
    $id = slug($child->label);
    if ($child->type == 'region-monde') {
        return "<div id='{$id}' class='{$child->type}'>";
    }
    if ($child->type == 'pays') {
        return "<div id='{$id}' class='{$child->type}'><h2>{$child->label}</h2>";
    }
    if ($child->type == 'region') {
        return "<div id='{$id}'><h3>{$child->label}</h3>";
    }
    if ($child->type == 'sous-region') {
        return "<div id='{$id}'><h4>{$child->label}</h4>";
    }
    if ($child->type == 'promo') {
        return "<div>" . create_promo_wines($child->id);
    }
    if ($child->type == 'vins-au-verre') {
        return "<div>" . print_vins_au_verre($child->id);
    }
    if ($child->type == 'demi-bouteilles') {
        return "<div>" . print_demi_bouteilles($child->id);
    } else {
        return "";
    }
}