Make user page covers shelf clickable
This commit is contained in:
@ -1,11 +0,0 @@
|
|||||||
function show_compose(element) {
|
|
||||||
var visible_compose_boxes = document.getElementsByClassName('visible');
|
|
||||||
for (var i = 0; i < visible_compose_boxes.length; i++) {
|
|
||||||
visible_compose_boxes[i].className = 'compose-suggestion';
|
|
||||||
}
|
|
||||||
|
|
||||||
var target_id = 'compose-' + element.id;
|
|
||||||
var target = document.getElementById(target_id);
|
|
||||||
target.className += ' visible';
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
function show_compose(element) {
|
||||||
|
var visible_compose_boxes = document.getElementsByClassName('visible');
|
||||||
|
for (var i = 0; i < visible_compose_boxes.length; i++) {
|
||||||
|
visible_compose_boxes[i].className = 'compose-suggestion';
|
||||||
|
}
|
||||||
|
|
||||||
|
var target_id = 'compose-' + element.id;
|
||||||
|
var target = document.getElementById(target_id);
|
||||||
|
target.className += ' visible';
|
||||||
|
}
|
||||||
|
|
||||||
function hide_element(element) {
|
function hide_element(element) {
|
||||||
var classes = element.parentElement.className;
|
var classes = element.parentElement.className;
|
||||||
element.parentElement.className = classes.replace('visible', '');
|
element.parentElement.className = classes.replace('visible', '');
|
||||||
|
@ -2,22 +2,8 @@
|
|||||||
{% load fr_display %}
|
{% load fr_display %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="all-shelves content-container">
|
{% include 'snippets/covers_shelf.html' with shelves=shelves user=request.user %}
|
||||||
{% include 'snippets/covers_shelf.html' with shelves=shelves user=request.user %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% for shelf in shelves %}
|
|
||||||
{% for book in shelf.books %}
|
|
||||||
<div class="compose-suggestion" id="compose-book-{{ book.id }}">
|
|
||||||
<span class="close icon icon-close" onclick="hide_element(this)">
|
|
||||||
<span class="hidden-text">Close</span>
|
|
||||||
</span>
|
|
||||||
<div class="content-container">
|
|
||||||
{% include 'snippets/create_status.html' with book=book user=request.user %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<div id="feed">
|
<div id="feed">
|
||||||
<div class="content-container tabs">
|
<div class="content-container tabs">
|
||||||
@ -31,5 +17,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/feed.js"></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{% load fr_display %}
|
{% load fr_display %}
|
||||||
{% for shelf in shelves %}
|
|
||||||
{% if shelf.books %}
|
<div class="all-shelves content-container">
|
||||||
<div>
|
{% for shelf in shelves %}
|
||||||
|
{% if shelf.books %}
|
||||||
|
<div>
|
||||||
<h2>{{ shelf.name }}
|
<h2>{{ shelf.name }}
|
||||||
{% if shelf.size > shelf.books|length %}
|
{% if shelf.size > shelf.books|length %}
|
||||||
<small>(<a href="/shelf/{{ user | username }}/{{ shelf.identifier }}">See all {{ shelf.size }}</a>)</small>
|
<small>(<a href="/shelf/{{ user | username }}/{{ shelf.identifier }}">See all {{ shelf.size }}</a>)</small>
|
||||||
@ -15,6 +17,20 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
{% for shelf in shelves %}
|
||||||
|
{% for book in shelf.books %}
|
||||||
|
<div class="compose-suggestion" id="compose-book-{{ book.id }}">
|
||||||
|
<span class="close icon icon-close" onclick="hide_element(this)">
|
||||||
|
<span class="hidden-text">Close</span>
|
||||||
|
</span>
|
||||||
|
<div class="content-container">
|
||||||
|
{% include 'snippets/create_status.html' with book=book user=request.user %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include 'user_header.html' with user=user %}
|
{% include 'user_header.html' with user=user %}
|
||||||
<div class="all-shelves content-container">
|
{% include 'snippets/covers_shelf.html' with shelves=shelves user=user %}
|
||||||
{% include 'snippets/covers_shelf.html' with shelves=shelves user=user %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="content-container"><h2>User Activity</h2></div>
|
<div class="content-container"><h2>User Activity</h2></div>
|
||||||
|
Reference in New Issue
Block a user