mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-31 07:13:02 +00:00 
			
		
		
		
	Fix for #443
This commit is contained in:
		| @@ -15,46 +15,49 @@ | |||||||
|       <div class="btn-toolbar" role="toolbar"> |       <div class="btn-toolbar" role="toolbar"> | ||||||
|         <div class="btn-group" role="group" aria-label="Download, send to Kindle, reading"> |         <div class="btn-group" role="group" aria-label="Download, send to Kindle, reading"> | ||||||
|           {% if g.user.role_download() %} |           {% if g.user.role_download() %} | ||||||
|  |             {% if entry.data|length %} | ||||||
|             <div class="btn-group" role="group"> |             <div class="btn-group" role="group"> | ||||||
|             {% if entry.data|length < 3 %} |                 {% if entry.data|length < 3 %} | ||||||
|               <button type="button" class="btn btn-primary"> |                   <button type="button" class="btn btn-primary"> | ||||||
|                 {{_('Download')}} : |                     {{_('Download')}} : | ||||||
|               </button> |                   </button> | ||||||
|                 {% for format in entry.data %} |                   {% for format in entry.data %} | ||||||
|                 <a href="{{ url_for('get_download_link_ext', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format) }}" id="btnGroupDrop1{{format.format|lower}}" class="btn btn-primary" role="button"> |                   <a href="{{ url_for('get_download_link_ext', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format) }}" id="btnGroupDrop1{{format.format|lower}}" class="btn btn-primary" role="button"> | ||||||
|                   <span class="glyphicon glyphicon-download"></span>{{format.format}} ({{ format.uncompressed_size|filesizeformat }}) |                     <span class="glyphicon glyphicon-download"></span>{{format.format}} ({{ format.uncompressed_size|filesizeformat }}) | ||||||
|                 </a> |                   </a> | ||||||
|                 {% endfor %} |                   {% endfor %} | ||||||
|               {% else %} |                 {% else %} | ||||||
|                 <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |                   <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||||||
|                   <span class="glyphicon glyphicon-download"></span> {{_('Download')}} |                     <span class="glyphicon glyphicon-download"></span> {{_('Download')}} | ||||||
|                   <span class="caret"></span> |                     <span class="caret"></span> | ||||||
|                 </button> |                   </button> | ||||||
|                 <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1"> |                   <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1"> | ||||||
|                 {% for format in entry.data %} |                   {% for format in entry.data %} | ||||||
|                   <li><a href="{{ url_for('get_download_link_ext', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format) }}">{{format.format}} ({{ format.uncompressed_size|filesizeformat }})</a></li> |                     <li><a href="{{ url_for('get_download_link_ext', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format) }}">{{format.format}} ({{ format.uncompressed_size|filesizeformat }})</a></li> | ||||||
|                 {% endfor %} |                   {% endfor %} | ||||||
|                 </ul> |                   </ul> | ||||||
|               {% endif %} |                 {% endif %} | ||||||
|             </div> |             </div> | ||||||
|  |             {% endif %} | ||||||
|           {% endif %} |           {% endif %} | ||||||
|  |  | ||||||
|             {% if g.user.kindle_mail and g.user.is_authenticated %} |             {% if g.user.kindle_mail and g.user.is_authenticated %} | ||||||
|             <a href="{{url_for('send_to_kindle', book_id=entry.id)}}" id="sendbtn" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> {{_('Send to Kindle')}}</a> |             <a href="{{url_for('send_to_kindle', book_id=entry.id)}}" id="sendbtn" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> {{_('Send to Kindle')}}</a> | ||||||
|             {% endif %} |             {% endif %} | ||||||
|  |               {% if entry.data|length  %} | ||||||
|               <div class="btn-group" role="group"> |               <div class="btn-group" role="group"> | ||||||
|                 <button id="read-in-browser" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |                 <button id="read-in-browser" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||||||
|                   <span class="glyphicon glyphicon-eye-open"></span> {{_('Read in browser')}} |                   <span class="glyphicon glyphicon-eye-open"></span> {{_('Read in browser')}} | ||||||
|                   <span class="caret"></span> |                   <span class="caret"></span> | ||||||
|                 </button> |                 </button> | ||||||
|                 <ul class="dropdown-menu" aria-labelledby="read-in-browser"> |                     <ul class="dropdown-menu" aria-labelledby="read-in-browser"> | ||||||
|                   {% for format in entry.data %} |                     {% for format in entry.data %} | ||||||
|                   {%if format.format|lower == 'epub' or format.format|lower == 'txt' or format.format|lower == 'pdf' or format.format|lower == 'cbr' or format.format|lower == 'cbt' or format.format|lower == 'cbz' %} |                       {%if format.format|lower == 'epub' or format.format|lower == 'txt' or format.format|lower == 'pdf' or format.format|lower == 'cbr' or format.format|lower == 'cbt' or format.format|lower == 'cbz' %} | ||||||
|                   <li><a target="_blank" href="{{ url_for('read_book', book_id=entry.id, book_format=format.format|lower) }}">{{format.format}}</a></li> |                       <li><a target="_blank" href="{{ url_for('read_book', book_id=entry.id, book_format=format.format|lower) }}">{{format.format}}</a></li> | ||||||
|                   {% endif %} |                       {% endif %} | ||||||
|                   {%endfor%} |                     {%endfor%} | ||||||
|                 </ul> |                     </ul> | ||||||
|               </div> |               </div> | ||||||
|  |               {% endif %} | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|       <h2>{{entry.title}}</h2> |       <h2>{{entry.title}}</h2> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 OzzieIsaacs
					OzzieIsaacs