Mercurial > kallithea
comparison rhodecode/templates/summary/summary.html @ 3625:260a7a01b054 beta
follow Python conventions for boolean values
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 28 Mar 2013 01:10:45 +0100 |
parents | eacd33e0c5b3 |
children | 802c94bdfc85 |
comparison
equal
deleted
inserted
replaced
3624:4dddb7ee8865 | 3625:260a7a01b054 |
---|---|
144 <label>${_('Download')}:</label> | 144 <label>${_('Download')}:</label> |
145 </div> | 145 </div> |
146 <div class="input ${summary(c.show_stats)}"> | 146 <div class="input ${summary(c.show_stats)}"> |
147 %if len(c.rhodecode_repo.revisions) == 0: | 147 %if len(c.rhodecode_repo.revisions) == 0: |
148 ${_('There are no downloads yet')} | 148 ${_('There are no downloads yet')} |
149 %elif c.enable_downloads is False: | 149 %elif not c.enable_downloads: |
150 ${_('Downloads are disabled for this repository')} | 150 ${_('Downloads are disabled for this repository')} |
151 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | 151 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
152 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} | 152 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")} |
153 %endif | 153 %endif |
154 %else: | 154 %else: |