Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit d0da47d779269086fca877cd4a57915ffd60e785
Author: Richard Marko <rmarko(a)fedoraproject.org>
Date: Mon Jan 27 15:18:49 2014 +0100
[frontend] use default filter instead of *_not_filled
Signed-off-by: Richard Marko <rmarko(a)fedoraproject.org>
---------------------------------------------------------------
coprs_frontend/coprs/models.py | 8 --------
.../coprs/templates/coprs/detail/overview.html | 4 ++--
coprs_frontend/coprs/templates/coprs/show.html | 2 +-
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/coprs_frontend/coprs/models.py b/coprs_frontend/coprs/models.py
index a299518..b4ac6ed 100644
--- a/coprs_frontend/coprs/models.py
+++ b/coprs_frontend/coprs/models.py
@@ -161,14 +161,6 @@ class Copr(db.Model, helpers.Serializer):
return self.repos.split()
@property
- def description_or_not_filled(self):
- return self.description or "Description not filled in by author. Very likely
personal repository for testing purpose, which you should not use."
-
- @property
- def instructions_or_not_filled(self):
- return self.instructions or "Instructions not filled in by author. Author
knows what to do. Everybody else should avoid this repo."
-
- @property
def active_chroots(self):
"""
Return list of active mock_chroots of this copr
diff --git a/coprs_frontend/coprs/templates/coprs/detail/overview.html
b/coprs_frontend/coprs/templates/coprs/detail/overview.html
index 7bebca0..dadb3ac 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/overview.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/overview.html
@@ -6,9 +6,9 @@
{% block detail_body %}
<h2>Description</h2>
- <div class="shift-right">{{ copr.description_or_not_filled|markdown
}}</div>
+ <div class="shift-right">{{
copr.description|markdown|default('Description not filled in by author. Very likely
personal repository for testing purpose, which you should not use.', true)
}}</div>
<h2>Installation Instructions</h2>
- <div class="shift-right">{{ copr.instructions_or_not_filled|markdown
}}</div>
+ <div class="shift-right">{{
copr.instructions|markdown|default('Instructions not filled in by author. Author knows
what to do. Everybody else should avoid this repo.', true) }}</div>
<h2>Active Releases</h2>
<div class="disclaimer">
The following unofficial repositories are provided as-is by owner of this project.
diff --git a/coprs_frontend/coprs/templates/coprs/show.html
b/coprs_frontend/coprs/templates/coprs/show.html
index 4a25617..0971b0a 100644
--- a/coprs_frontend/coprs/templates/coprs/show.html
+++ b/coprs_frontend/coprs/templates/coprs/show.html
@@ -29,7 +29,7 @@
{% for copr in coprs %}
<div class="copr">
<a class="coprs-list" href="{{
url_for('coprs_ns.copr_detail', username = copr.owner.name, coprname = copr.name)
}}">{{ copr.owner.name }}/{{ copr.name }}</a>
- <p>{{ copr.description_or_not_filled|markdown }}</p>
+ <p>{{ copr.description|markdown|default('Description not filled in by
author. Very likely personal repository for testing purpose, which you should not
use.', true) }}</p>
<p class="repos">
{% for mock_chroot in copr.active_chroots %}
{{ mock_chroot.os_release|os_name_short(mock_chroot.os_version) }}.{{
mock_chroot.arch }}{% if not loop.last %}, {% endif %}