Skip to content

Commit

Permalink
Merge branch 'fix/links-between-versions' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
cmltaWt0 committed Jul 4, 2018
2 parents 8dd5a25 + b07cdfe commit 8ee5154
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 29 deletions.
41 changes: 24 additions & 17 deletions mysite/lms/static/css/instructor/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mysite/lms/static/css/instructor/app.css.map

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions mysite/lms/static/sass/instructor/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,22 @@
> *:first-child {
margin-top: -12px;;
}

.alert {
padding: 12px 24px;
}

.alert-info {
a {
color: #31708f;
font-weight: 500;
text-decoration: underline;

&:hover, &:focus, &:active {
text-decoration: none;
}
}
}
}

.card__empty-state {
Expand All @@ -136,6 +152,23 @@
}
}

.card__notice {
background: #d9edf7;
color: #31708f;
border-bottom: 1px solid #DDE2E6;
padding: 23px 24px;

a {
color: #31708f;
font-weight: 500;
text-decoration: underline;

&:hover, &:focus, &:active {
text-decoration: none;
}
}
}

// Larger viewports
@media (min-width: 1024px) {
.card {
Expand Down Expand Up @@ -198,4 +231,8 @@
margin: 0;
}
}

.card__notice {
padding: 23px 60px;
}
}
10 changes: 5 additions & 5 deletions mysite/templates/ctms/create_unit_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ <h1>Add Thread</h1>
</nav>
{% endif %}

<div class="card__notice">
You can also search Courselets for exercises to add, using <a href="{% url 'ct:unit_lessons' course_id=course.id unit_id=courslet.id %}">the old Instructor UI</a>.
</div>

<main class="card__content">
<form action="{% url 'ctms:unit_create' course_pk=course.id courslet_pk=courslet.id %}" method="POST">

Expand All @@ -37,11 +41,7 @@ <h1>Add Thread</h1>

{% csrf_token %}

<a href="{% url 'ct:unit_lessons' course_id=course.id unit_id=courslet.id %}" class="pull-left" style="margin-top:60px; padding: 14px 0px;">
You can also search Courselets for exercises to add, using the old Instructor UI.
</a>
<input class='push-right' type="submit" value="Save">

<input type="submit" value="Save">
</form>
</main>
</div>
Expand Down
5 changes: 4 additions & 1 deletion mysite/templates/ctms/unit_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ <h1>{{ unit.lesson.title }}</h1>
</ul>
</nav>

<div class="card__notice">
You can find additional features in <a href="{% url 'ct:unit_answers' course_id=course.id unit_id=courslet.id %}">the old Instructor UI</a>.
</div>

<main class="card__content">
{% if responses %}
<table>
Expand Down Expand Up @@ -66,7 +70,6 @@ <h3>{{ answer.author }}</h3>
{% else %}
<p>No answers yet.</p>
{% endif %}
<a href="{% url 'ct:unit_answers' course_id=course.id unit_id=courslet.id %}" class="btn btn-warning" style="margin-top:30px;">Switch to an old UI</a>
</main>
</div>
{% endblock %}
10 changes: 5 additions & 5 deletions mysite/templates/ctms/unit_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ <h1>{{ unit.lesson.title }}</h1>
{% endfor %}
{# <!-- or for crispy forms --> {% crispy item_form %} #}
<a href="#" class="error-models-form__remove">Remove error model</a>

{% if course_pk and courslet and item_form.ul_id.value %}
<a class="btn btn-success pull-right edit-resolutions" style="margin-top:1em;"
href="{% url 'ct:resolutions' course_id=course_pk unit_id=courslet.unit.id ul_id=item_form.ul_id.value %}">
Edit resolutions
</a>
<div class="alert alert-info">
<a class="edit-resolutions" href="{% url 'ct:resolutions' course_id=course_pk unit_id=courslet.unit.id ul_id=item_form.ul_id.value %}">Switch to the old Instructor UI</a> if you want to add resolutions.
</div>
{% endif %}
</div>
{% endfor %}
Expand Down Expand Up @@ -264,7 +264,7 @@ <h1>{{ unit.lesson.title }}</h1>
me.closest('form').submit();
e.preventDefault();
});

$('.edit-resolutions').on('click', function (e) {
var form = $(this).closest('form');
var action = form.attr('action');
Expand Down

0 comments on commit 8ee5154

Please sign in to comment.