show 'better author and tags editing; partly copied from https://bitbucket.org/SpeedProg/calibreserver
This commit is contained in:
@@ -11,9 +11,14 @@
|
||||
</div>
|
||||
<div class="col-sm-9 col-lg-9 book-meta">
|
||||
<h2>{{entry.title}}</h2>
|
||||
<p class="author"><a href="{{url_for('author', name=entry.authors[0].name) }}">{{entry.authors[0].name}}</a>
|
||||
</p>
|
||||
|
||||
<p class="author">
|
||||
{% for author in entry.authors %}
|
||||
<a href="{{url_for('author', name=author.name) }}">{{author.name}}</a>
|
||||
{% if not loop.last %}
|
||||
&
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if entry.ratings.__len__() > 0 %}
|
||||
<div class="rating">
|
||||
<p>
|
||||
|
||||
@@ -1,26 +1,6 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
{% if book %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('input.typeahead').typeahead({
|
||||
name: 'accounts',
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: '{{ url_for('get_authors_json') }} ',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query,
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
process(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="col-sm-3 col-lg-3 col-xs-12">
|
||||
<div class="cover">
|
||||
{% if book.has_cover is defined %}
|
||||
@@ -36,12 +16,7 @@ $(document).ready(function(){
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="bookAuthor">Author</label>
|
||||
{% if book.authors|length > 1 %}
|
||||
{% for author in book.authors %}
|
||||
<p>{{author.name.join(" & ")}}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<input type="text" data-provide="typeahead" class="form-control typeahead" name="author_name" id="bookAuthor" autocomplete="off" value="{{book.authors[0].name}}">
|
||||
<input type="text" class="form-control typeahead" name="author_name" id="bookAuthor" value="{{' & '.join(authors)}}" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
@@ -78,3 +53,11 @@ $(document).ready(function(){
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{{ url_for('static', filename='js/typeahead.bundle.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/edit_books.js') }}"></script>
|
||||
{% endblock %}
|
||||
{% block header %}
|
||||
<link href="{{ url_for('static', filename='css/typeahead.css') }}" rel="stylesheet" media="screen">
|
||||
{% endblock %}
|
||||
|
||||
@@ -50,7 +50,14 @@
|
||||
</div>
|
||||
<div class="meta">
|
||||
<p class="title">{{entry.title|shortentitle}}</p>
|
||||
<p class="author"><a href="{{url_for('author', name=entry.authors[0].name) }}">{{entry.authors[0].name}}</a></p>
|
||||
<p class="author">
|
||||
{% for author in entry.authors %}
|
||||
<a href="{{url_for('author', name=author.name) }}">{{author.name}}</a>
|
||||
{% if not loop.last %}
|
||||
&
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if entry.ratings.__len__() > 0 %}
|
||||
<div class="rating">
|
||||
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
<script src="https://code.jquery.com/jquery.js"></script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap3-typeahead.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/underscore.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/intention.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/context.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/plugins.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
|
||||
{% block header %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
@@ -154,5 +154,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% block js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -22,7 +22,14 @@
|
||||
</div>
|
||||
<div class="meta">
|
||||
<p class="title">{{entry.title|shortentitle}}</p>
|
||||
<p class="author"><a href="{{url_for('author', name=entry.authors[0].name) }}">{{entry.authors[0].name}}</a></p>
|
||||
<p class="author">
|
||||
{% for author in entry.authors %}
|
||||
<a href="{{url_for('author', name=author.name) }}">{{author.name}}</a>
|
||||
{% if not loop.last %}
|
||||
&
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if entry.ratings.__len__() > 0 %}
|
||||
<div class="rating">
|
||||
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
|
||||
|
||||
Reference in New Issue
Block a user