~edwargix/git.sr.ht

3dd257c7f966237329b9071be5581a44269209b5 — Robin Krahl 7 years ago f2bed6f
Add log link to branches on refs page

Currently, the branches listed on the refs page only link to the tree
and the last commit.  This patch adds a link to the log as it is
otherwise impossible to reach it without editing the URL.
1 files changed, 20 insertions(+), 8 deletions(-)

M gitsrht/templates/refs.html
M gitsrht/templates/refs.html => gitsrht/templates/refs.html +20 -8
@@ 79,14 79,26 @@
        <div class="event">
          {{name}}
          {{ utils.commit_event(repo, commit, skip_body=True) }}
          <a
            href="{{url_for("repo.tree",
              owner=repo.owner.canonical_name,
              repo=repo.name, ref=name)}}"
            class="btn btn-block {{ "btn-primary"
                if branch.name == git_repo.default_branch().name
                else "btn-default" }}"
          >browse {{icon("caret-right")}}</a>
          <div class="row">
            <div class="col">
              <a
                href="{{url_for("repo.tree",
                  owner=repo.owner.canonical_name,
                  repo=repo.name, ref=name)}}"
                class="btn btn-block {{ "btn-primary"
                    if branch.name == git_repo.default_branch().name
                    else "btn-default" }}"
              >browse {{icon("caret-right")}}</a>
	    </div>
	    <div class="col">
              <a
                href="{{url_for("repo.log",
                  owner=repo.owner.canonical_name,
                  repo=repo.name, ref=name)}}"
                class="btn btn-block btn-default"
              >log {{icon("caret-right")}}</a>
	    </div>
	  </div>
        </div>
        {% endfor %}
      </div>