<commit_before><?php

$title = 'Service overview';
$this->headTitle($title);


$filterLink = $this->url('client',
    array(
        'controller' => 'user',
        'action' => 'index',
    )
);

?>
    <h1><?php echo $this->escapeHtml($title); ?></h1>

<p>
<br />
    <form class="form-inline" method="get" action="<?php echo $filterLink ?>">
        <div class="form-group">
            <label for="description">Description</label>
            <input type="text" class="form-control" id="description" name="description" value="<?php echo $this->description ?>">
        </div>
        <div class="form-group">
            <label for="category">Category</label>
            <input type="text" class="form-control" id="category" name="category" value="<?php echo $this->category ?>">
        </div>
        <button type="submit" class="btn btn-default">Filter</button>
    </form>
</p>
<br />

<?php if($this->success): ?>


    <table class="table table-striped">
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Description</th>
            <th>Categories</th>
            <th>Action</th>
        </tr>
        <?php foreach($this->services as $item):?>
            <?php
            $link = $this->url('client',
                array(
                    'controller' => 'user',
                    'action' => 'detail',
                    'id' => $item->id,
                )
            );
            ?>

            <?php
            $executeLink = $this->url('client',
                array(
                    'controller' => 'user',
                    'action' => 'execute',
                    'id' => $item->id,
                )
            );
            ?>

            <tr>
                <td><?php echo $item->id ?></td>
                <td><?php echo $item->name ?></td>
                <td><?php echo $item->description ?></td>
                <td><?php echo $item->categories ?></td>
                <td>
                    <a class="btn btn-info" href="<?php echo $link ?>">Details</a>
                    <a class="btn btn-success" href="<?php echo $executeLink ?>">Execute</a>
                </td>
            </tr><commit_msg>changed display of categories in service overview<commit_after><?php

$title = 'Service overview';
$this->headTitle($title);


$filterLink = $this->url('client',
    array(
        'controller' => 'user',
        'action' => 'index',
    )
);

?>
    <h1><?php echo $this->escapeHtml($title); ?></h1>

<p>
<br />
    <form class="form-inline" method="get" action="<?php echo $filterLink ?>">
        <div class="form-group">
            <label for="description">Description</label>
            <input type="text" class="form-control" id="description" name="description" value="<?php echo $this->description ?>">
        </div>
        <div class="form-group">
            <label for="category">Category</label>
            <input type="text" class="form-control" id="category" name="category" value="<?php echo $this->category ?>">
        </div>
        <button type="submit" class="btn btn-default">Filter</button>
    </form>
</p>
<br />

<?php if($this->success): ?>


    <table class="table table-striped">
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Description</th>
            <th>Categories</th>
            <th>Action</th>
        </tr>
        <?php foreach($this->services as $item):?>
            <?php
            $link = $this->url('client',
                array(
                    'controller' => 'user',
                    'action' => 'detail',
                    'id' => $item->id,
                )
            );
            ?>

            <?php
            $executeLink = $this->url('client',
                array(
                    'controller' => 'user',
                    'action' => 'execute',
                    'id' => $item->id,
                )
            );
            ?>

            <tr>
                <td><?php echo $item->id ?></td>
                <td><?php echo $item->name ?></td>
                <td><?php echo $item->description ?></td>
                <?php if($item->categories && (!empty($item->categories))): ?>
                    <td><?php echo implode(', ',json_decode($item->categories)) ?></td>
                <?php else: ?>
                    <td></td>
                <?php endif ?>
                <td>
                    <a class="btn btn-info" href="<?php echo $link ?>">Details</a>
                    <a class="btn btn-success" href="<?php echo $executeLink ?>">Execute</a>
                </td>
            </tr>
{'fraction_non_alphanumeric': 0.19010416666666666, 'fraction_numerical': 0.0008680555555555555, 'mean_word_length': 1.5310269082921473, 'pattern_counts': {'":': 0, '<': 136, '<?xml version=': 0, '>': 184, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7230750', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1293, 'n_words': 268}