| | $this->renderLayout( function() { |
| | $this->renderBreadcrumbs( $this->currentRepo, ['Tags'] ); |
| | - |
| | echo '<h2>Tags</h2>'; |
| | - echo '<table class="tag-table">'; |
| | - echo '<thead>'; |
| | - echo '<tr>'; |
| | - echo '<th>Name</th>'; |
| | - echo '<th>Message</th>'; |
| | - echo '<th>Author</th>'; |
| | - echo '<th class="tag-age-header">Age</th>'; |
| | - echo '<th class="tag-commit-header">Commit</th>'; |
| | - echo '</tr>'; |
| | - echo '</thead>'; |
| | - echo '<tbody>'; |
| | |
| | $tags = []; |
| | - |
| | $this->git->eachTag( function( Tag $tag ) use ( &$tags ) { |
| | $tags[] = $tag; |
| | } ); |
| | |
| | usort( $tags, function( Tag $a, Tag $b ) { |
| | return $a->compare( $b ); |
| | } ); |
| | - |
| | - $renderer = new HtmlTagRenderer( $this->currentRepo['safe_name'] ); |
| | |
| | if( empty( $tags ) ) { |
| | - echo '<tr><td colspan="5"><div class="empty-state">' . |
| | - '<p>No tags found.</p></div></td></tr>'; |
| | + echo '<div class="empty-state"><p>No tags found.</p></div>'; |
| | } else { |
| | - $count = count( $tags ); |
| | + $renderer = new HtmlTagRenderer( $this->currentRepo['safe_name'] ); |
| | + |
| | + echo '<table class="tag-table">'; |
| | + echo '<thead>'; |
| | + echo '<tr>'; |
| | + echo '<th>Name</th><th>Message</th><th>Author</th>'; |
| | + echo '<th class="tag-age-header">Age</th>'; |
| | + echo '<th class="tag-commit-header">Commit</th>'; |
| | + echo '</tr>'; |
| | + echo '</thead>'; |
| | + echo '<tbody>'; |
| | |
| | + $count = count( $tags ); |
| | for( $i = 0; $i < $count; $i++ ) { |
| | $tag = $tags[$i]; |
| | $prevTag = $tags[$i + 1] ?? null; |
| | - |
| | $tag->render( $renderer, $prevTag ); |
| | } |
| | - } |
| | |
| | - echo '</tbody>'; |
| | - echo '</table>'; |
| | + echo '</tbody>'; |
| | + echo '</table>'; |
| | + } |
| | }, $this->currentRepo ); |
| | } |