Skip to content

Commit

Permalink
Merge pull request #866 from uw-it-aca/hotfix/MUWM-3955
Browse files Browse the repository at this point in the history
Hotfix/muwm 3955
  • Loading branch information
fanglinfang authored Sep 12, 2017
2 parents 496ad49 + c9ea754 commit 3a582b7
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 144 deletions.
3 changes: 1 addition & 2 deletions myuw/static/css/boilerplate.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ body { padding: 0; margin: 0; font-family: "Open Sans",Helvetica,Arial,Verdana,s

.container { max-width: none; }

.heading-page { display: none;
.heading-page, .myuw-heading-page { display: none;
@media @desktop { display: block; margin-top: 0; }
}
}
Expand Down Expand Up @@ -205,7 +205,6 @@ body { padding: 0; margin: 0; font-family: "Open Sans",Helvetica,Arial,Verdana,s

.textbooks-container {
background: transparent !important;
margin-bottom: 0 !important;
}

.future-quarter-container {
Expand Down
14 changes: 1 addition & 13 deletions myuw/static/css/desktop.less
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ body {

/* stand-alone page subheaders */

#app_content .category-container .category-content h3, #app_content .textbooks-container h3 {
#app_content .category-container .category-content h3 {
font-size: 22px;
}

Expand All @@ -78,11 +78,6 @@ body {
margin-bottom: 10px;
}

/* textbook page header */

#app_content .textbooks-container h2 {
margin-bottom: 1em;
}

/* category page headers */
.category-content h3.category-sub-header {
Expand Down Expand Up @@ -210,13 +205,6 @@ body {
}
}

// textbooks page

.textbooks-container {
h4 {font-size: @font-header-smaller;}
.dl-books {font-size: @font-base;margin-left: 10px;}
}


} //end #app_content

Expand Down
25 changes: 0 additions & 25 deletions myuw/static/css/mobile.less
Original file line number Diff line number Diff line change
Expand Up @@ -1926,31 +1926,6 @@ label { font-weight: normal; margin-bottom: auto; }
}
}

// textbooks page

.textbooks-container {
color: #555;
background-color: #fff;
margin-bottom: -3em;
padding-bottom: 3em;

h3 { font-family: 'Roboto', sans-serif; font-weight: 400; font-size: 16px; line-height: 30px; margin: 0; color: #222; }
h4 { font-family: 'Open Sans', sans-serif; font-size: 14px;
span { text-transform: uppercase; font-size: 11px; }
}

.book-cover, .no-book-cover { margin-right: 10px; }

.no-book-cover { width:80px; height: 127px; border:solid 1px #ddd; padding: 20px 10px; color: #777; text-align: center; }

.dl-books { font-size: 13px;

dt { color: #444; text-transform: uppercase; font-size: 12px; }
dd { color: #222; margin-bottom: 7px; }
}

}


// categories (resources) page

Expand Down
33 changes: 33 additions & 0 deletions myuw/static/css/textbooks.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@import (reference) "typography.less";


// textbooks page

.textbooks-container {
color: #555;
background-color: #fff;

.books-list {
h3 { font-family: 'Roboto', sans-serif; font-weight: 400; font-size: 22px; line-height: 30px; margin: 0; color: #222; }
h4 { font-family: 'Open Sans', sans-serif; font-size: @font-header-smaller;
span { text-transform: uppercase; font-size: 11px; }
}

&[data-toggle="collapse"] { cursor: pointer; }
}

h2.myuw-heading-page + .books-list {
margin-top: 1em;
}

.book-cover, .no-book-cover { margin-right: 10px; }

.no-book-cover { width:80px; height: 127px; border:solid 1px #ddd; padding: 20px 10px; color: #777; text-align: center; }

.dl-books { font-size: @font-base; margin-left: 10px;

dt { color: #444; text-transform: uppercase; font-size: 12px; }
dd { color: #222; margin-bottom: 7px; }
}

}
4 changes: 3 additions & 1 deletion myuw/static/css/typography.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
font-family: 'encode_sans_normalbold', sans-serif;
font-weight: 600;
color: #444;
font-size: @font-header-larger;
margin: 0 0 8px 0;

h2& { font-size: @font-header-larger; }
h3& { font-size: @font-header-large; }
}

#app_content .card .myuw-card-title {
Expand Down
1 change: 1 addition & 0 deletions myuw/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<link href="{% static 'css/ratings.less' %}" rel="stylesheet" type="text/less">
<link href="{% static 'css/components.less' %}" rel="stylesheet" type="text/less">
<link href="{% static 'css/photo_list.less' %}" rel="stylesheet" type="text/less">
<link href="{% static 'css/textbooks.less' %}" rel="stylesheet" type="text/less">
{% endcompress %}

<!-- google fonts -->
Expand Down
208 changes: 105 additions & 103 deletions myuw/templates/handlebars/textbooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,129 @@
{% tplhandlebars "textbooks" %}

<div class="container textbooks-container">
<h2 id="future_cards_header" class="heading-page"><span style="text-transform:uppercase;">{{quarter}} {{year}}</span> {{summer_term}} Textbooks</h2>
<h2 id="future_cards_header" class="myuw-heading-page"><span style="text-transform:uppercase;">{{quarter}} {{year}}</span> {{summer_term}} Textbooks</h2>

{{#if is_teaching}}
<h3>
Teaching
</h3>
<h3 class="myuw-heading-page">Teaching</h3>
<hr />
{{#each teaching_sections}}
<div class="books-list" {{#if @root.collapse_sections}} style="margin-bottom:10px;" data-toggle="collapse" data-target="#books{{sln}}"{{/if}}>
<a name="{{toUrlSafe curriculum}}{{course_number}}{{section_id}}" />
{{#if @root.collapse_sections}}
<h4 style="display:inline;">
<h4 style="display:inline;" class="course-name">
<div class="c{{color_id}} simplesquare" aria-hidden="true"></div> {{curriculum}} {{course_number}}{{section_id}}
</h4>

<div style="display:inline; margin-left:15px;" >
{{books.length}} {{pluralize books.length "textbook" "textbooks"}}
</div>
{{else}}
<h3 style="display:inline;">
<h3 style="display:inline;" class="course-name">
<div class="c{{color_id}} simplesquare" aria-hidden="true"></div> {{curriculum}} {{course_number}}{{section_id}}
</h3>
{{/if}}
<br>


{{#if has_books}}
{{#eachWithIndex books}}
<div id="books{{../sln}}" class="clearfix book-image {{#if @root.collapse_sections}}collapse{{/if}}" >
<h4 class="book-title">{{title}}</h4>
{{#if cover_image_url}}
<div class="book-cover pull-left"><img src="{% if request.is_secure %}https://{% else %}http://{% endif %}{{cover_image_url}}" alt="{{title}} book cover" width="80px" /></div>
{{else}}
<div class="no-book-cover pull-left" title="No cover image available">No Image Available</div>
{{/if}}

<dl class="dl-books">
<dt>Author</dt>
{{#each authors}}
<dd>{{name}}</dd>
{{/each}}

<dt>New </dt>
<dd>
{{#if price}}
${{formatPrice price}}
{{else}}
*
{{/if}}
</dd>

<dt>Used</dt>
<dd>
{{#if used_price}}
${{formatPrice used_price}}
{{else}}
*
{{/if}}
</dd>

{{#if notes}}
<dt>Notes</dt>
{{#if is_required}}
<dd>Required</dd>
{{else}}
<dd>{{notes}}</dd>
{{/if}}
{{/if}}
{{#if isbn}}
<dt>ISBN</dt>
<dd>{{isbn}}</dd>
{{/if}}
</dl>
</div>
{{/eachWithIndex}}
{{else}}
<div id="books{{sln}}" class="{{#if @root.collapse_sections}}collapse{{/if}}" style="margin-bottom:25px;">
No textbooks have been ordered for this course.
<a href="http://www2.bookstore.washington.edu/textsys/TextReqLogin.taf?school={{#if bothell_campus}}uwbothell{{else}}{{#if tacoma_campus}}uwtacoma{{else}}uwmain{{/if}}{{/if}}">Order textbooks</a>.

<!-- if IOR -->
</div>
{{/if}}
</div>

{{#if @root.collapse_sections}}
{{else}}
<hr />
{{/if}}

{{/each}}

{{#if @root.collapse_sections}}
<hr />
{{/if}}
{{#if enrolled_sections}}
<h3 class="myuw-heading-page">Enrolled</h3>
<hr />
{{/if}}

{{/if}}

{{#each enrolled_sections}}
<div class="books-list" {{#if @root.collapse_sections}} style="margin-bottom:10px;" data-toggle="collapse" data-target="#books{{sln}}"{{/if}}>
<a name="{{toUrlSafe curriculum}}{{course_number}}{{section_id}}" />
{{#if @root.collapse_sections}}
<h4 style="display:inline;" class="course-name">
<div class="c{{color_id}} simplesquare" aria-hidden="true"></div> {{curriculum}} {{course_number}}{{section_id}} {{#if is_instructor}}- Instructor{{/if}}
</h4>

<div style="display:inline; margin-left:15px;" >
{{books.length}} {{pluralize books.length "textbook" "textbooks"}}
</div>
{{else}}
<h3 style="display:inline;" class="course-name">
<div class="c{{color_id}} simplesquare" aria-hidden="true"></div> {{curriculum}} {{course_number}}{{section_id}} {{#if is_instructor}}- Instructor{{/if}}
</h3>
{{/if}}
<br>


{{#if has_books}}
{{#eachWithIndex books}}
<div id="books{{../sln}}" class="clearfix book-image {{#if @root.collapse_sections}}collapse{{/if}}" >
<h4>{{title}}</h4>
<h4 class="book-title">{{title}}</h4>
{{#if cover_image_url}}
<div class="book-cover pull-left"><img src="{% if request.is_secure %}https://{% else %}http://{% endif %}{{cover_image_url}}" alt="{{title}} book cover" width="80px" /></div>
{{else}}
Expand Down Expand Up @@ -77,107 +170,16 @@ <h4>{{title}}</h4>
</dl>
</div>
{{/eachWithIndex}}
{{else}}
<div id="books{{sln}}" class="{{#if @root.collapse_sections}}collapse{{/if}}" style="margin-bottom:25px;">
No textbooks have been ordered for this course.
<a href="http://www2.bookstore.washington.edu/textsys/TextReqLogin.taf?school={{#if bothell_campus}}uwbothell{{else}}{{#if tacoma_campus}}uwtacoma{{else}}uwmain{{/if}}{{/if}}">Order textbooks</a>.

<!-- if IOR --> </div>
{{/if}}

{{#if @root.collapse_sections}}
{{else}}
<hr />
{{/if}}

{{/each}}

{{#if @root.collapse_sections}}
<hr />
{{/if}}
<h3>
Enrolled
</h3>
<hr />

{{/if}}

{{#each enrolled_sections}}
<div class="books-list" {{#if @root.collapse_sections}} style="margin-bottom:10px;" data-toggle="collapse" data-target="#books{{sln}}"{{/if}}>
<a name="{{toUrlSafe curriculum}}{{course_number}}{{section_id}}" />
{{#if @root.collapse_sections}}
<h4 style="display:inline;">
<div class="c{{color_id}} simplesquare" aria-hidden="true"></div> {{curriculum}} {{course_number}}{{section_id}} {{#if is_instructor}}- Instructor{{/if}}
</h4>

<div style="display:inline; margin-left:15px;" >
{{books.length}} {{pluralize books.length "textbook" "textbooks"}}
</div>
{{else}}
<h3 style="display:inline;">
<div class="c{{color_id}} simplesquare" aria-hidden="true"></div> {{curriculum}} {{course_number}}{{section_id}} {{#if is_instructor}}- Instructor{{/if}}
</h3>
{{/if}}
<br>
</div>

{{#if has_books}}
{{#eachWithIndex books}}
<div id="books{{../sln}}" class="clearfix book-image {{#if @root.collapse_sections}}collapse{{/if}}" >
<h4>{{title}}</h4>
{{#if cover_image_url}}
<div class="book-cover pull-left"><img src="{% if request.is_secure %}https://{% else %}http://{% endif %}{{cover_image_url}}" alt="{{title}} book cover" width="80px" /></div>
{{else}}
<div class="no-book-cover pull-left" title="No cover image available">No Image Available</div>
{{/if}}

<dl class="dl-books">
<dt>Author</dt>
{{#each authors}}
<dd>{{name}}</dd>
{{/each}}

<dt>New </dt>
<dd>
{{#if price}}
${{formatPrice price}}
{{else}}
*
{{/if}}
</dd>

<dt>Used</dt>
<dd>
{{#if used_price}}
${{formatPrice used_price}}
{{else}}
*
{{/if}}
</dd>

{{#if notes}}
<dt>Notes</dt>
{{#if is_required}}
<dd>Required</dd>
{{else}}
<dd>{{notes}}</dd>
{{/if}}
{{/if}}
{{#if isbn}}
<dt>ISBN</dt>
<dd>{{isbn}}</dd>
{{/if}}
</dl>
<div id="books{{sln}}" class="{{#if @root.collapse_sections}}collapse{{/if}}" style="margin-bottom:25px;">
No textbook requirement has been received for this course.
Please check with your instructor.
</div>
{{/eachWithIndex}}

{{else}}
<div id="books{{sln}}" class="{{#if @root.collapse_sections}}collapse{{/if}}" style="margin-bottom:25px;">
No textbook requirement has been received for this course.
Please check with your instructor.
<!-- if IOR --> </div>
{{/if}}
</div> <!-- end booklist -->

{{/if}}

{{#if @root.collapse_sections}}
{{else}}
Expand Down

0 comments on commit 3a582b7

Please sign in to comment.