Commit 382b0622 authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Merge branch 'ui-links-import-webapp-version' into 'django'

add links for importing webapp versions on the webapp import page

See merge request !147
parents f9ce65d5 a2756a09
Pipeline #44829 failed with stage
in 48 seconds
......@@ -367,6 +367,8 @@ class WebappImport(SuccessMessageMixin, LoginRequiredMixin, IsProviderMixin, For
def get_context_data(self, **kwargs):
ctx=super().get_context_data()
ctx["import_url"] = config.env.ALLGO_IMPORT_URL+"/apps"
ctx["imported_apps"] = Webapp.objects.filter(
imported=True, user=self.request.user).order_by("name")
return ctx
def form_valid(self, form):
......
......@@ -36,6 +36,17 @@
</div>
<input class="btn btn-primary" type="submit" value="Import webapp">
</form>
<p></p>
{% if imported_apps %}
<h3>Import new versions</h3>
<ul>
{% for webapp in imported_apps %}
<li><a href="{% url 'main:webapp_version_import' webapp.docker_name %}">{{ webapp.name}}<a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endblock %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment