{{ define "tab-content"}}
<div class="modal fade" id="helpModal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Test Sequence History</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <table class="help-table">
                    <tr>
                        <td colspan="2">
                            This shows a list of all versions of a test sequence.
                            Click on a row to view the details of the selected version.
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
<div class="tab-card card" id="tabTestsequences" xmlns:15="http://www.w3.org/1999/xhtml">
    <nav class="navbar navbar-light action-bar p-3">
        <div class="input-group flex-nowrap">
            <button class="btn btn-secondary" id="buttonBackToSequence">
                <i class="fa fa-long-arrow-left" aria-hidden="true"></i>
                <span class="d-none d-sm-inline"> Back</span>
            </button>
        </div>
    </nav>
    <div class="row tab-side-bar-row">
        <div class="col-12 p-3">
            <h4 class="mb-3">History of {{ .TestSequence.Name }}</h4>
            <div class="form-group">
                <ul class="list-group" id="commitHistory">
                    {{ range .TestSequence.SequenceVersions }}
                    <li class="list-group-item versionLine" id="{{ .VersionNr }}">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-auto">
                                    <abbr title="Test Sequence Version">
                                                <span class="badge badge-primary mr-3">
                                                {{ .VersionNr }}
                                                </span>
                                    </abbr>
                                </div>
                                <div class="col">
                                    {{ if eq .Message "" }}
                                    <div class="text-muted">No commit message</div>
                                    {{ else }}
                                    {{ .Message }}
                                    {{ end }}
                                </div>
                                <div class="col-md-auto mr-4 mt-2 mt-md-0 mb-2 mb-md-0">
                                    {{ if eq .IsMinor true }}
                                    <span class="badge badge-info float-none float-md-right"><abbr
                                            title="This was a minor edit">Minor</abbr>
                                            </span>
                                    {{ end }}
                                </div>
                                <div class="col-md-auto">
                                    <abbr title="{{ .CreationDate.Format " Jan 02, 2006 15:04:05 UTC" }}">
                                    <span class="text-muted">{{ TimeSince .CreationDate }}</span>
                                    </abbr>
                                </div>
                            </div>
                        </div>
                    </li>
                    {{ end }}
                </ul>
            </div>
        </div>
    </div>
    <script src="/static/js/testsequences.js"></script>
</div>
{{ end }}