Commit 179db2d0 by swdanielli

delete resource, doc string, code cleaning

parent 6b18c0f8
...@@ -22,14 +22,17 @@ ...@@ -22,14 +22,17 @@
.recommender_row_top, .recommender_modify_title_container { .recommender_row_top, .recommender_modify_title_container {
/* overflow:scroll; /* overflow:scroll;
max-height:200px;*/ max-height:200px;*/
font-size: 20px; font-size: 14px;
padding-top: 0.5em; padding-top: 0.5em;
padding-left: 0.5em; padding-left: 0.5em;
background-color: #f5efef; background-color: #f5efef;
height: 40px; height: 28px;
color: #948f8f; color: #948f8f;
} }
.recommender_row_top:before { content: 'Show'; }
.recommender_row_top.resource_list_expanded:before { content: 'Hide'; }
.recommender_row { .recommender_row {
height: 380px; height: 380px;
} }
...@@ -131,9 +134,9 @@ ...@@ -131,9 +134,9 @@
.recommender_blurb { .recommender_blurb {
display:inline-block; display:inline-block;
vertical-align: middle; vertical-align: middle;
width:525px; width:585px;
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; word-wrap: break-word;
} }
.recommender_entryId, .recommender_descriptionImg, .recommender_problematicReason, .recommender_descriptionText { .recommender_entryId, .recommender_descriptionImg, .recommender_problematicReason, .recommender_descriptionText {
...@@ -157,7 +160,7 @@ ...@@ -157,7 +160,7 @@
color: red; color: red;
} }
.recommender_vote_arrow_down, .recommender_vote_arrow_up, .recommender_title, .resource_edit_button, .flagResource, .resource_add_button, .hide-show, .paginationCell, .backToViewButton { cursor: pointer; } .recommender_vote_arrow_down, .recommender_vote_arrow_up, .recommender_title, .resource_edit_button, .flagResource, .staffEdition, .resource_add_button, .hide-show, .paginationCell, .backToViewButton { cursor: pointer; }
.resource_add_button { text-align: right; font-weight: bold; } .resource_add_button { text-align: right; font-weight: bold; }
.resource_edit_button { float: left; } .resource_edit_button { float: left; }
...@@ -178,6 +181,10 @@ ...@@ -178,6 +181,10 @@
.backToViewButton { color: #1d9dd9; float: left; } .backToViewButton { color: #1d9dd9; float: left; }
.flag_reason_submit, .edit_submit, .add_submit { margin-top: 0.5em; }
.delete_resource, .endorse_resource, .deendorse_resource { margin-top: 0.5em; float:left; }
.ui-icon.problematic { .ui-icon.problematic {
background-image: url(http://download.jqueryui.com/themeroller/images/ui-icons_ff0000_256x240.png); background-image: url(http://download.jqueryui.com/themeroller/images/ui-icons_ff0000_256x240.png);
} }
...@@ -197,9 +204,9 @@ ...@@ -197,9 +204,9 @@
.recommender_modify_title { float: right; padding-right: 2em; overflow: auto; } .recommender_modify_title { float: right; padding-right: 2em; overflow: auto; }
.nonevoting { color: #948f8f; }
.hide-show-icon { margin-left: 0.5em; } .hide-show-icon { margin-left: 0.5em; }
.recommender_vote_score, .recommender_vote_arrow_up, .recommender_vote_arrow_down { color: #948f8f; }
.recommender_vote_score.upvoting, .recommender_vote_arrow_up.upvoting { color: rgb(69, 194, 10); } .recommender_vote_score.upvoting, .recommender_vote_arrow_up.upvoting { color: rgb(69, 194, 10); }
.recommender_vote_score.downvoting, .recommender_vote_arrow_down.downvoting { color: red; } .recommender_vote_score.downvoting, .recommender_vote_arrow_down.downvoting { color: red; }
.recommender_vote_arrow_up.downvoting, .recommender_vote_arrow_down.upvoting { color: #948f8f; } .recommender_vote_arrow_up.downvoting, .recommender_vote_arrow_down.upvoting { color: #948f8f; }
...@@ -213,6 +220,5 @@ ...@@ -213,6 +220,5 @@
.moreIcon:before { content: '...'; } .moreIcon:before { content: '...'; }
.lightgreyBg { background-color: #948f8f; } .lightgreyBg { background-color: #948f8f; }
a { word-break: break-all; }
a:link, a:visited { color: black; } a:link, a:visited { color: black; }
form { margin: 0em; } form { margin: 0em; }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="recommender_recommendations"> <div class="recommender_recommendations">
<div class="recommender_content"> <div class="recommender_content">
<div class="recommender_row_top hide-show resource_list_expanded"> <div class="recommender_row_top hide-show resource_list_expanded">
Related resources<div class='recommender_panel'> <span class='hide-show-icon upArrowIcon'></span> </div> Related Resources<div class='recommender_panel'> <span class='hide-show-icon upArrowIcon'></span> </div>
</div> </div>
<div class='recommender_row_inner'> <div class='recommender_row_inner'>
<div class="recommender_row"> <div class="recommender_row">
...@@ -17,16 +17,16 @@ ...@@ -17,16 +17,16 @@
</div> </div>
% for elem in resources: % for elem in resources:
<% <%
if elem['id'] in downvotes: if elem['id'] in downvotedIds:
voteMode = "downvoting" voteMode = "downvoting"
elif elem['id'] in upvotes: elif elem['id'] in upvotedIds:
voteMode = 'upvoting' voteMode = 'upvoting'
else: else:
voteMode = 'nonevoting' voteMode = ''
if elem['id'] in flagId: if elem['id'] in flaggedIds:
flagMode = 'problematic' flagMode = 'problematic'
reason = flagReason[flagId.index(elem['id'])] reason = flaggedReasons[flaggedIds.index(elem['id'])]
else: else:
flagMode = '' flagMode = ''
reason = '' reason = ''
...@@ -77,13 +77,19 @@ ...@@ -77,13 +77,19 @@
</div> </div>
<div class='recommender_modify'> <div class='recommender_modify'>
<div class='recommender_modify_title_container'><div class='backToViewButton'>&lt; Related resources</div><div class='recommender_modify_title'></div></div> <div class='recommender_modify_title_container'><div class='backToViewButton'>&lt; Related resources</div><div class='recommender_modify_title'></div></div>
<div class="staffEditionBlock">
<div class="staffEditionBlockTitle">Delete, endorse or de-endorse a resource.</div>
<input type="button" value="Delete resource" class="delete_resource">
<input type="button" value="Endorse resource" class="endorse_resource">
<input type="button" value="De-endorse resource" class="deendorse_resource">
</div>
<div class="flagSourceBlock"> <div class="flagSourceBlock">
<div class="flagSourceBlockTitle">Why would you like to flag this resource?</div> <div class="flagSourceBlockTitle">Why would you like to flag this resource?</div>
<input type="text" <input type="text"
class="flag_reason" class="flag_reason"
name="flag_rationale" name="flag_rationale"
placeholder="Reason for why this resource should be removed"/><br/> placeholder="Reason for why this resource should be removed"/><br/>
<input type="button" value="Flag resource" class="flag_reason_submit" style="margin-top: 0.5em;"> <input type="button" value="Flag resource" class="flag_reason_submit">
</div> </div>
<div class="editSourceBlock"> <div class="editSourceBlock">
<div class="editSourceBlockTitle">Edit the description, hypelink, and previewing screenshot for the selected resource.</div> <div class="editSourceBlockTitle">Edit the description, hypelink, and previewing screenshot for the selected resource.</div>
...@@ -101,7 +107,7 @@ ...@@ -101,7 +107,7 @@
placeholder="Provide a meaningful description so other students know whether this is useful to them"></textarea><br/> placeholder="Provide a meaningful description so other students know whether this is useful to them"></textarea><br/>
<form method="post" id="editResourceForm"> <form method="post" id="editResourceForm">
Previewing screenshot: <input type="file" name="file"><br/> Previewing screenshot: <input type="file" name="file"><br/>
<input type="button" value="Save change" class="edit_submit" style="margin-top: 0.5em" disabled > <input type="button" value="Save change" class="edit_submit" disabled >
</form> </form>
</div> </div>
<div class="recommender_add"> <div class="recommender_add">
...@@ -120,7 +126,7 @@ ...@@ -120,7 +126,7 @@
placeholder="Provide a meaningful description so other students know whether this is useful to them"></textarea><br/> placeholder="Provide a meaningful description so other students know whether this is useful to them"></textarea><br/>
<form method="post" id="addResourceForm"> <form method="post" id="addResourceForm">
Previewing screenshot: <input type="file" name="file"><br/> Previewing screenshot: <input type="file" name="file"><br/>
<input type="button" value="Add resource" class="add_submit" style="margin-top: 0.5em" disabled > <input type="button" value="Add resource" class="add_submit" disabled >
</form> </form>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment