mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-11-04 09:13:02 +00:00 
			
		
		
		
	Merge branch 'master' into Develop
# Conflicts: # cps/helper.py # cps/templates/user_edit.html # cps/web.py
This commit is contained in:
		@@ -689,8 +689,7 @@ def upload():
 | 
				
			|||||||
            db.session.commit()
 | 
					            db.session.commit()
 | 
				
			||||||
            db.update_title_sort(config)
 | 
					            db.update_title_sort(config)
 | 
				
			||||||
            book = db.session.query(db.Books).filter(db.Books.id == book_id).filter(common_filters()).first()
 | 
					            book = db.session.query(db.Books).filter(db.Books.id == book_id).filter(common_filters()).first()
 | 
				
			||||||
 | 
					            # upload book to gdrive if necessary and add "(bookid)" to folder name
 | 
				
			||||||
            # upload book to gdrive if nesseccary and add "(bookid)" to folder name
 | 
					 | 
				
			||||||
            if config.config_use_google_drive:
 | 
					            if config.config_use_google_drive:
 | 
				
			||||||
                gdriveutils.updateGdriveCalibreFromLocal()
 | 
					                gdriveutils.updateGdriveCalibreFromLocal()
 | 
				
			||||||
            error = helper.update_dir_stucture(book.id, config.config_calibre_dir)
 | 
					            error = helper.update_dir_stucture(book.id, config.config_calibre_dir)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
      <input type="email" class="form-control" name="email" id="email" value="{{ content.email if content.email != None }}" autocomplete="off">
 | 
					      <input type="email" class="form-control" name="email" id="email" value="{{ content.email if content.email != None }}" autocomplete="off">
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    {% if ( g.user and g.user.role_passwd() or g.user.role_admin() ) and not content.role_anonymous() %}
 | 
					    {% if ( g.user and g.user.role_passwd() or g.user.role_admin() ) and not content.role_anonymous() %}
 | 
				
			||||||
      {% if g.user and g.user.role_admin() and not new_user and not profile and ( mail_configured and content.email if content.email != None %}
 | 
					      {% if g.user and g.user.role_admin() and not new_user and not profile and ( mail_configured and content.email if content.email != None ) %}
 | 
				
			||||||
        <div class="btn btn-default" id="resend_password"><a href="{{url_for('admin.reset_user_password', user_id = content.id) }}">{{_('Reset user Password')}}</a></div>
 | 
					        <div class="btn btn-default" id="resend_password"><a href="{{url_for('admin.reset_user_password', user_id = content.id) }}">{{_('Reset user Password')}}</a></div>
 | 
				
			||||||
      {% endif %}
 | 
					      {% endif %}
 | 
				
			||||||
        <div class="form-group">
 | 
					        <div class="form-group">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -981,11 +981,7 @@ def render_read_books(page, are_read, as_xml=False, order=None, *args, **kwargs)
 | 
				
			|||||||
    entries, random, pagination = fill_indexpage(page, db.Books, db_filter, order)
 | 
					    entries, random, pagination = fill_indexpage(page, db.Books, db_filter, order)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if as_xml:
 | 
					    if as_xml:
 | 
				
			||||||
        currtime = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S+00:00")
 | 
					        return entries, pagination
 | 
				
			||||||
        xml = render_template(current_time=currtime, instance=config.config_calibre_web_title, *args, **kwargs)
 | 
					 | 
				
			||||||
        response = make_response(xml)
 | 
					 | 
				
			||||||
        response.headers["Content-Type"] = "application/xml; charset=utf-8"
 | 
					 | 
				
			||||||
        return response
 | 
					 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        if are_read:
 | 
					        if are_read:
 | 
				
			||||||
            name = _(u'Read Books') + ' (' + str(len(readBookIds)) + ')'
 | 
					            name = _(u'Read Books') + ' (' + str(len(readBookIds)) + ')'
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user