Skip to content

Commit

Permalink
[#1571] Style disabled Update button
Browse files Browse the repository at this point in the history
  • Loading branch information
gabemart committed Aug 7, 2015
1 parent 6da8cbe commit 2879deb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
8 changes: 8 additions & 0 deletions akvo/rsr/static/styles-src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,14 @@ nav.navbar-fixed-top {
min-width: 170px; } }
.myProjectList div.twoColumns.clearfix > a {
min-width: 70px; }
.myProjectList a.addUpdate.disabled {
background-color: #AB9F9F;
color: #E9E9E9;
pointer-events: initial;
cursor: not-allowed;
border: none; }
.myProjectList a.addUpdate.disabled:hover {
text-decoration: none; }

div.paginationWrap {
clear: both; }
Expand Down
15 changes: 15 additions & 0 deletions akvo/rsr/static/styles-src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,21 @@ nav.navbar-fixed-top {
min-width: 70px;
}
}
a {
&.addUpdate {
&.disabled {
background-color: #AB9F9F;
color: #E9E9E9;
pointer-events: initial;
cursor: not-allowed;
border: none;

&:hover {
text-decoration: none;
}
}
}
}
}

div.paginationWrap {
Expand Down
4 changes: 3 additions & 1 deletion akvo/templates/myrsr/my_projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ <h4 class="media-heading">{{ project.title }}</h4>
{% if project.is_published %}
{% has_perm 'rsr.post_updates' project as can_add_update %}
<a href="{% url 'add-update' project.pk %}">{% trans 'Update' %}</a>
{% endif %}
{% else %}
<a class="addUpdate disabled" title="{% trans "Can't update an unpublished project" %}">{% trans 'Update' %}</a>
{% endif %}
</div>
</td>
</tr>
Expand Down

0 comments on commit 2879deb

Please sign in to comment.