Skip to content

Commit

Permalink
[frontend] use icons correctly
Browse files Browse the repository at this point in the history
Changing from:
<span class="icon"> Text </span>

To:
<span class="icon></span> Test

Because the icon tag should not contain anything according
to the bootstrap/patternfly guidelines.
  • Loading branch information
asamalik committed Mar 7, 2016
1 parent 4581f60 commit 6619abe
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 35 deletions.
20 changes: 9 additions & 11 deletions frontend/coprs_frontend/coprs/templates/_helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<ul class="list-unstyled">
{% if info %}
<li class="help-block">
<small class="text-muted pficon pficon-info">
{{info|safe}}
</small>
<small class="text-muted pficon pficon-info"></small> {{info|safe}}
</li>
{% endif %}
{% if field.errors %}
Expand Down Expand Up @@ -103,21 +101,21 @@
{% macro build_state_text(state) %}
<span class="build-{{ state }}" title="{{ state | build_state_description }}">
{% if state == "importing" %}
<span class="pficon pficon-running"> {{ state }} </span>
<span class="pficon pficon-running"></span> {{ state }}
{% elif state == "pending" %}
<span class="pficon pficon-running"> {{ state }} </span>
<span class="pficon pficon-running"></span> {{ state }}
{% elif state == "starting" %}
<span class="pficon pficon-running"> {{ state }} </span>
<span class="pficon pficon-running"></span> {{ state }}
{% elif state == "running" %}
<span class="pficon pficon-running"> {{ state }} </span>
<span class="pficon pficon-running"></span> {{ state }}
{% elif state == "succeeded" %}
<span class="pficon pficon-ok"> {{ state }} </span>
<span class="pficon pficon-ok"></span> {{ state }}
{% elif state == "skipped" %}
<span class="pficon pficon-ok"> {{ state }} </span>
<span class="pficon pficon-ok"></span> {{ state }}
{% elif state == "failed" %}
<span class="pficon pficon-error-circle-o"> {{ state }} </span>
<span class="pficon pficon-error-circle-o"></span> {{ state }}
{% elif state == "canceled" %}
<span class="pficon pficon-close"> {{ state }} </span>
<span class="pficon pficon-close"></span> {{ state }}
{% else %}
<span> unknown </span>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions frontend/coprs_frontend/coprs/templates/admin/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
{% block body %}
{% macro nav_element(tab_name, tab_title, icon, href) %}
<li class="{% if selected_tab == tab_name %}active{% endif %}">
<a href="{{ href }}"> <span class="{{icon}}">{% if "pficon" not in icon %}&nbsp;{%endif%}
<a href="{{ href }}"> <span class="{{icon}}"></span> {% if "pficon" not in icon %}&nbsp;{%endif%}
{{ tab_title }}
</span></a>
</a>
</li>
{% endmacro %}

Expand Down
4 changes: 2 additions & 2 deletions frontend/coprs_frontend/coprs/templates/coprs/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ <h1 class="project-name">

{% macro nav_element(tab_name, tab_title, icon, href) %}
<li class="{% if selected_tab == tab_name %}active{% endif %}">
<a href="{{ href }}"> <span class="{{icon}}">{% if "pficon" not in icon %}&nbsp;{%endif%}
<a href="{{ href }}"> <span class="{{icon}}"></span>{% if "pficon" not in icon %}&nbsp;{%endif%}
{{ tab_title }}
</span></a>
</a>
</li>
{% endmacro %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h3 class="panel-title">3. Select chroots and other options</h3>
<form class="{{class}}" action="{{ copr_url('coprs_ns.copr_cancel_build', build.copr, build_id=build.id) }}" method="post">
<input type="hidden" value="page" value="{{ page }}">
<button class="btn btn-default" type="submit">
<span class="pficon pficon-close"> Cancel</span>
<span class="pficon pficon-close"></span> Cancel
</button>
</form>
{% endif %}
Expand All @@ -220,7 +220,7 @@ <h3 class="panel-title">3. Select chroots and other options</h3>
<form class="{{class}}" action="{{ copr_url('coprs_ns.copr_repeat_build', build.copr, build_id=build.id) }}" method="post">
<input type="hidden" value="page" value="{{ page }}">
<button class="btn btn-default" type="submit">
<span class="pficon pficon-restart"> Resubmit</span>
<span class="pficon pficon-restart"></span> Resubmit
</button>
</form>
{% endif %}
Expand All @@ -231,7 +231,7 @@ <h3 class="panel-title">3. Select chroots and other options</h3>
<form class="{{class}}" action="{{ url_for('coprs_ns.copr_delete_build', username=build.copr.owner.name, coprname=build.copr.name, build_id=build.id)}}" method="post">
<input type="hidden" value="page" value="{{ page }}">
<button class="btn btn-default" type="submit">
<span class="pficon pficon-delete"> Delete</span>
<span class="pficon pficon-delete"></span> Delete
</button>
</form>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro describe_failure(build) %}
{% if build.fail_type %}
<dt>Build State:</dt>
<dd><span class="build-failed pficon pficon-error-circle-o"> failed</span></dd>
<dd><span class="build-failed pficon pficon-error-circle-o"></span> failed</dd>

<dt>State Description:</dt>
<dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ <h3 class="panel-title">Results</h3>
{% if chroot.started_on %}

<a href="{{ chroot.result_dir_url }}">
<span class="pficon pficon-folder-open">
{{ chroot.name }}
</span>
<span class="pficon pficon-folder-open"></span> {{ chroot.name }}
</a>
{% else %}
{{ chroot.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

{% block detail_body %}
{% if g.user and g.user.can_build_in(copr) %}
<a class="btn btn-primary button-new pull-right" href="{{ copr_url('coprs_ns.copr_add_build', copr) }}"><span class="pficon pficon-add-circle-o"> New Build </span></a>
<a class="btn btn-primary button-new pull-right" href="{{ copr_url('coprs_ns.copr_add_build', copr) }}"><span class="pficon pficon-add-circle-o"></span> New Build</a>
{% endif %}

<h2>Project Builds</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ <h2>Edit chroot '{{ chroot.name }}'</h2>

</code>
<button class="btn btn-default" type="submit" value="delete_comps" name="submit">
<span class="pficon pficon-delete">Delete</span>
<span class="pficon pficon-delete"></span> Delete
</button>
{% endif %}
<li class="help-block">
<small class="text-muted pficon pficon-info">
<small><span class="text-muted pficon pficon-info"></span>
If you would like to provide grouping meta information, please upload your comps.xml here
</small>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h3>Active Releases</h3>
</td>
<td class="rightmost">
<a class="btn btn-default btn-margin" href="{{ repo_file_href(copr, repo) }}">
<span class="pficon pficon-save"> {{ repo.name_release_human|capitalize }}</span>
<span class="pficon pficon-save"></span> {{ repo.name_release_human|capitalize }}
</a>
<small class="text-muted"> ({{ repo.dl_stat }} downloads) </small>
</td>
Expand Down Expand Up @@ -139,7 +139,7 @@ <h3 class="panel-title"> Quick Enable </h3>
dnf copr enable {{ copr_name(copr) }}
</div>
<a href="https://fedorahosted.org/copr/wiki/HowToEnableRepo" target="_blank">
<small class="pficon pficon-info"> More info about enabling Copr repositories</small></a>
<small><span class="pficon pficon-info"></span> More info about enabling Copr repositories</small></a>
</div>
</div>
{% if g.user and g.user.can_edit(copr) and copr and copr.owner and not copr.auto_createrepo %}
Expand All @@ -153,7 +153,7 @@ <h3 class="panel-title"> Regenerate Repositories </h3>
<span class="fa fa-refresh"> Regenerate</span></button>
</form>
<br>
<small class="pficon pficon-info text-muted"> Package repositories are not generated automatically after each build. You can change this setting on the Edit page</small>
<small><span class="pficon pficon-info text-muted"></span> Package repositories are not generated automatically after each build. You can change this setting on the Edit page</small>
</div>
</div>
{% endif %}
Expand All @@ -171,7 +171,7 @@ <h3 class="panel-title"> Other Actions </h3>
{% endif %}

<a href="{{ copr_url('coprs_ns.copr_report_abuse', copr) }}">
<small class="pficon pficon-warning-triangle-o"> Report Abuse </small></a>
<small><span class="pficon pficon-warning-triangle-o"></span> Report Abuse </small></a>
</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h3 class="panel-title pull-left">Default Build Source</h3>
{% if g.user and g.user.can_edit(copr) %}
<div class="btn-group pull-right">
<a class="btn btn-default btn-sm" href="{{ copr_url('coprs_ns.copr_edit_package', copr, package_name=package.name) }}">
<span class="pficon pficon-edit"> Edit</span>
<span class="pficon pficon-edit"></span> Edit
</a>
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

{% block detail_body %}
{% if g.user and g.user.can_edit(copr) %}
<a class="btn btn-primary button-new pull-right" href="{{ copr_url('coprs_ns.copr_add_package', copr) }}"><span class="pficon pficon-add-circle-o"> New package </span></a>
<a class="btn btn-primary button-new pull-right" href="{{ copr_url('coprs_ns.copr_add_package', copr) }}"><span class="pficon pficon-add-circle-o"></span> New package </a>
{% endif %}
<h2 class="page-title">Project Packages</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

{% if g.user %}
<a href="{{url_for('coprs_ns.copr_add', username=g.user.name) }}" class="btn button-new pull-right btn-primary">
<span class="pficon pficon-add-circle-o"> New Project </span>
<span class="pficon pficon-add-circle-o"></span> New Project
</a>
{% endif %}
<h2 class="page-title"> Projects </h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ <h1>@{{group.name}} Group</h1>

{% if g.user and g.user.can_build_in_group(group) %}
<a href="{{url_for('coprs_ns.group_copr_add', group_name=group.name) }}" class="btn button-new pull-right btn-primary">
<span class="pficon pficon-add-circle-o">
<span class="pficon pficon-add-circle-o"></span>
New Group Project
</span>
</a>
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1>{{user.name|capitalize}}'s Profile</h1>

{% if g.user == user %}
<a href="{{url_for('coprs_ns.copr_add', username=g.user.name) }}" class="btn button-new pull-right btn-primary">
<span class="pficon pficon-add-circle-o"> New Project </span>
<span class="pficon pficon-add-circle-o"></span> New Project
</a>
{% endif %}

Expand Down

0 comments on commit 6619abe

Please sign in to comment.