1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00

chore(views): use ng-href instead of href for better dynamic href handling

This commit is contained in:
Sebastian Müller 2014-07-23 21:39:50 +02:00
parent 4d4026d309
commit 13cb2a89b4
6 changed files with 11 additions and 11 deletions

View File

@ -10,7 +10,7 @@ minor modifications to the style that only apply to this view
<article id="loginpage">
<div class="pure-g">
<div class="pure-u-1" ng-if="state == 1 && remotes.length != 0" ng-repeat="remote in remotes">
<a href="/login/{{ remote.type }}" target="_self">
<a ng-href="/login/{{ remote.type }}" target="_self">
<i class="fa {{ remote.type | remoteIcon }}"></i> {{ remote.type | remoteName }}
</a>
</div>

View File

@ -1,6 +1,6 @@
<div class="toast" ng-if="msg != undefined">
<span>commit </span>
<a href="/{{ msg.repo | fullPath }}/{{ msg.commit.branch }}/{{ msg.commit.sha }}">{{ msg.commit.sha | shortHash }}</a>
<a ng-href="/{{ msg.repo | fullPath }}/{{ msg.commit.branch }}/{{ msg.commit.sha }}">{{ msg.commit.sha | shortHash }}</a>
<span ng-if="msg.commit.status == 'Started'">is running</span>
<span ng-if="msg.commit.status == 'Success'">finished successfully</span>
<span ng-if="msg.commit.status == 'Failure'">finished with errors</span>
@ -10,7 +10,7 @@
<article id="repopage">
<nav>
<div class="options" ng-if="repo.role.admin">
<a class="pure-button pure-button-primary" href="/{{ repo | fullPath }}/settings">
<a class="pure-button pure-button-primary" ng-href="/{{ repo | fullPath }}/settings">
<i class="fa fa-sliders"></i> Settings
</a>
</div>
@ -18,7 +18,7 @@
<a href="/"><span class="fa fa-th"></span></a>
<span>{{ repo.owner }}</span>
<span>/</span>
<a href="/{{ repo | fullPath}}">{{ repo.name }}</a>
<a ng-href="/{{ repo | fullPath}}">{{ repo.name }}</a>
</nav>
<section ng-if="repo.active == false" class="inactive">
@ -37,7 +37,7 @@
<section ng-repeat="group in commits | unique: 'branch'">
<div class="pure-g cards">
<h2 class="pure-u-1" style="font-size:22px;margin-bottom:20px;"><i class="fa fa-code-fork"></i> {{group.branch}}</h2>
<a class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-4 pure-u-xl-1-4 card card" href="/{{ repo | fullPath }}/{{ commit.branch }}/{{ commit.sha }}" ng-repeat="commit in commits | filter: { branch: group.branch } | limitTo:4" data-status="{{ commit.status }}">
<a class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-4 pure-u-xl-1-4 card card" ng-href="/{{ repo | fullPath }}/{{ commit.branch }}/{{ commit.sha }}" ng-repeat="commit in commits | filter: { branch: group.branch } | limitTo:4" data-status="{{ commit.status }}">
<div class="l-box">
<h2>{{ commit.message }}</h2>
<em ng-if="commit.finished_at != 0">{{ commit.finished_at | fromNow }}</em>

View File

@ -1,11 +1,11 @@
<article id="repoconfpage">
<nav>
<a href="/{{ repo | fullPath }}">
<a ng-href="/{{ repo | fullPath }}">
<span class="fa fa-arrow-left"></span>
</a>
<span>{{ repo.owner }}</span>
<span>/</span>
<a href="/{{ repo | fullPath }}">{{ repo.name }}</a>
<a ng-href="/{{ repo | fullPath }}">{{ repo.name }}</a>
<span>/</span>
<a href="#">settings</a>
</nav>
@ -50,7 +50,7 @@
<section>
<div class="pure-g">
<div class="pure-u-1">
<a href="/{{ repo | fullPath }}" target="_blank" style="float:right;">
<a ng-href="/{{ repo | fullPath }}" target="_blank" style="float:right;">
<img ng-src="/v1/badge/{{ repo | fullPath }}/status.svg" />
</a>
<h2>Status Badge</h2>

View File

@ -9,7 +9,7 @@
<input type="search" placeholder="FILTER" class="pure-u-1" id="search" ng-model="search" autofocus />
</form>
<a class="repo" ng-repeat="repo in repos | filter:search | orderBy: 'name' " href="/{{ repo | fullPath }}">
<a class="repo" ng-repeat="repo in repos | filter:search | orderBy: 'name' " ng-href="/{{ repo | fullPath }}">
<div class="pure-g">
<div class="pure-u-5-6">
<div>

View File

@ -15,7 +15,7 @@
<input type="search" placeholder="FILTER" class="pure-u-1" id="search" ng-model="search" autofocus />
</form>
<a class="user" ng-repeat="user in users | filter:search | orderBy: 'login' " href="/admin/users/{{ user.remote }}/{{ user.login}}">
<a class="user" ng-repeat="user in users | filter:search | orderBy: 'login' " ng-href="/admin/users/{{ user.remote }}/{{ user.login}}">
<div class="pure-g">
<div class="pure-u-1-8">
<div>

View File

@ -3,7 +3,7 @@
<a href="/admin/users"><span class="fa fa-arrow-left"></span></a>
<a href="/admin/users">users</a>
<span class="separator">/</span>
<a href="/admin/users/{{account.remote}}/{{ account.login }}">edit</a>
<a ng-href="/admin/users/{{account.remote}}/{{ account.login }}">edit</a>
</nav>
<section class="pure-g profile">