Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1206

Přidáno uživatelem Michal Kliment před více než 13 roky(ů)

U vypisu vsech segmentu pridan sloupec Pocet polozek = pocet vsech rozhrani a portu patrici do daneho segmentu. Dale tento sloupec pridan do filtru.

Zobrazit rozdíly:

freenetis/branches/testing/application/models/segment.php
FROM
(
SELECT s.id, s.name, medium_id AS medium, s.duplex, s.comment,
s.bitrate
s.bitrate, (SELECT COUNT(*) FROM ifaces WHERE segment_id = s.id) +
(SELECT COUNT(*) FROM ports WHERE segment_id = s.id) as items_count
FROM segments s
LEFT JOIN enum_types e ON s.medium_id = e.id
LEFT JOIN (
......
SELECT * FROM
(
SELECT s.id, s.name, medium_id AS medium, s.duplex, s.comment,
s.bitrate
s.bitrate, (SELECT COUNT(*) FROM ifaces WHERE segment_id = s.id) +
(SELECT COUNT(*) FROM ports WHERE segment_id = s.id) as items_count
FROM segments s
LEFT JOIN enum_types e ON s.medium_id = e.id
LEFT JOIN (
freenetis/branches/testing/application/controllers/segments.php
$filter_form->add('comment');
$filter_form->add('items_count')
->type('number');
// model
$segment_model = new Segment_Model();
$total_segments = $segment_model->count_all_segments($filter_form->as_sql());
......
__('Yes')
))->class('center');
$grid->order_field('comment')
->label(__('Comment'));
$grid->order_field('items_count')
->label(__('Items count'));
$actions = $grid->grouped_action_field();

Také k dispozici: Unified diff