feat: insentive replace

This commit is contained in:
tdurieux
2017-10-02 17:53:58 +02:00
parent fa0a67795a
commit eaed61eb6d
3 changed files with 11 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>GitHub Anonymous</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
@@ -13,23 +13,18 @@
<body>
<div class="main">
<div class="container-fluid">
<h1>GihHub Anonymous</h1>
<h2>Anonymous a GitHub repository</h2>
<h1>GitHub Anonymous</h1>
<h2>Anonymize a GitHub repository</h2>
<form action="" method="post">
<div class="form-group">
<label for="name">GitHub Repository</label>
<input class="form-control" value="{{ repo.name }}" name="name" id="name" aria-describedby="name" placeholder="Anonymous Name">
<small id="nameHelp" class="form-text text-muted">The anonymous name of the repository.</small>
</div>
<div class="form-group">
<label for="githubRepository">GitHub Repository</label>
<input type="url" value="{{ repo.repository }}" class="form-control" name="githubRepository" id="githubRepository" aria-describedby="githubRepository" placeholder="GitHub Repository">
<small id="githubRepositoryHelp" class="form-text text-muted">The github url to the repository that you want to anonymous.</small>
<input type="url" value="{{ repo.repository }}" class="form-control" name="githubRepository" id="githubRepository" aria-describedby="githubRepository" placeholder="GitHub Repository">
</div>
<div class="form-group">
<label for="ignoredTerms">The text to remove from the repository</label>
<label for="ignoredTerms">The text to remove from the repository will be replaced by XXX.</label>
<small id="ignoredTermsHelp" class="form-text text-muted">One term per line (case insensitive).</small>
<textarea class="form-control" name="terms" id="ignoredTerms" rows="5">{{ repo.terms|join('\n') }}</textarea>
<small id="ignoredTermsHelp" class="form-text text-muted">One term per line.</small>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
@@ -38,13 +33,13 @@
<form action="" method="get">
<div class="form-group">
<label for="name">Anonymous GitHub Repository</label>
<input class="form-control" name="id" id="name" aria-describedby="name" placeholder="Id Anonymous GitHub Repository">
<small id="nameHelp" class="form-text text-muted">The id of the Anonymous GitHub repository.</small>
<input class="form-control" name="id" id="name" aria-describedby="name" placeholder="Id Anonymous GitHub Repository">
</div>
<div class="form-group">
<label for="githubRepository">GitHub Repository</label>
<input type="url" class="form-control" name="githubRepository" id="githubRepository" aria-describedby="githubRepository" placeholder="GitHub Repository">
<small id="githubRepositoryHelp" class="form-text text-muted">The github url to the repository that you want to anonymous.</small>
<input type="url" class="form-control" name="githubRepository" id="githubRepository" aria-describedby="githubRepository" placeholder="GitHub Repository">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>

View File

@@ -18,7 +18,7 @@
<div class="paths">
{% set current_path = [] %}
{% do current_path.append('/repository/' + current_repository) %}
<span class="path"><a href="{{ current_path|join("/") }}">{{ name }}</a></span>
<span class="path"><a href="{{ current_path|join("/") }}">Root</a></span>
{% for item in path %}
{% do current_path.append(item) %}
<span class="path"><a href="{{ current_path|join("/") }}">{{ item }}</a></span>