From 917a6a8649a9a69287842d907447f3d5cfd1cba0 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Jan 22 2017 18:17:08 +0000 Subject: [PATCH 1/5] [frontend] suggest dnf to enable module --- diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html index fee10b7..0b9068d 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html @@ -115,9 +115,8 @@
-
# Add module repofile to your system (this will be automated by dnf in the future)
-wget {{ copr_url('coprs_ns.generate_module_repo_file', copr, _external=True) }} -O \
-     /etc/fm.modules.d/_copr_{{ module.full_name |replace("/", "-") }}-{{ module.id }}.cfg
+          
# Add module repofile to your system
+dnf copr enable {{ module.copr.full_name }}
 
 # Install the module
 dnf module enable {{ module.name }}
From feed5e75345d7aa1b5f27f769fbb12cb7e8d1091 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Jan 22 2017 18:17:08 +0000 Subject: [PATCH 2/5] [frontend] print info when there are no packages --- diff --git a/frontend/coprs_frontend/coprs/templates/coprs/create_module.html b/frontend/coprs_frontend/coprs/templates/coprs/create_module.html index 87902c6..5cfbe21 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/create_module.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/create_module.html @@ -60,6 +60,8 @@
+ {% set no_packages = 'No successfully built packages in this project yet' %} +
@@ -77,6 +79,8 @@ {{ render_checkbox("filter-{}".format(loop.index0), package, (package in form.filter.data or not form.is_submitted())) }}
+ {% else %} +

{{ no_packages }}

{% endfor %}
@@ -100,6 +104,8 @@ {{ render_checkbox("api-{}".format(loop.index0), package, (package in form.api.data)) }} + {% else %} +

{{ no_packages }}

{% endfor %} @@ -129,6 +135,8 @@ {{ render_checkbox("profile_pkgs-{}-{}".format(i, loop.index0), package, (package in form.profile_pkgs[i].data)) }} + {% else %} +

{{ no_packages }}

{% endfor %} diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html index 0b9068d..cdfac3d 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html +++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/module.html @@ -54,6 +54,8 @@ + {% set no_packages = 'No packages in module\'s %s' %} +
@@ -63,6 +65,8 @@
    {% for package in module.modulemd.filter.rpms %}
  • {{ package }}
  • + {% else %} +

    {{ no_packages | format('filter')}}

    {% endfor %}
@@ -78,6 +82,8 @@
    {% for package in module.modulemd.api.rpms %}
  • {{ package }}
  • + {% else %} +

    {{ no_packages | format('API')}}

    {% endfor %}
@@ -98,6 +104,8 @@
  • {{ package }}
  • {% endfor %} + {% else %} +

    No profiles in module

    {% endfor %}
    From ef6b961a2c8fd121230544fbee9e937b762e5174 Mon Sep 17 00:00:00 2001 From: Jakub Kadlčík Date: Jan 22 2017 18:17:08 +0000 Subject: [PATCH 3/5] [frontend] allow to have multiple info lines per field --- diff --git a/frontend/coprs_frontend/coprs/templates/_helpers.html b/frontend/coprs_frontend/coprs/templates/_helpers.html index 9165824..7ffda83 100644 --- a/frontend/coprs_frontend/coprs/templates/_helpers.html +++ b/frontend/coprs_frontend/coprs/templates/_helpers.html @@ -9,9 +9,11 @@ {{ field(class="form-control", **kwargs)|safe }}