Commit daf48105 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix twice render Books page

parent 834558eb
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -17,15 +17,15 @@ class Paginator:
    def calc_data(self):
        d1_MAXITEMS = self.MAXITEMS
        self.d1_first_pos = d1_MAXITEMS*(self.page_num-1);
        self.d1_first_pos = self.d1_first_pos if self.d1_first_pos<self.d1_count else self.d1_count
        self.d1_first_pos = self.d1_first_pos if self.d1_first_pos<self.d1_count else (self.d1_count-1 if self.d1_count else 0)
        self.d1_last_pos =  d1_MAXITEMS*self.page_num - 1;
        self.d1_last_pos = self.d1_last_pos if self.d1_last_pos<self.d1_count else self.d1_count   
        self.d1_last_pos = self.d1_last_pos if self.d1_last_pos<self.d1_count else (self.d1_count-1 if self.d1_count else 0) 
        
        d2_MAXITEMS = self.MAXITEMS - self.d1_last_pos + self.d1_first_pos
        self.d2_first_pos = d2_MAXITEMS*(self.page_num-1);
        self.d2_first_pos = self.d2_first_pos if self.d2_first_pos<self.d2_count else self.d2_count
        self.d2_first_pos = self.d2_first_pos if self.d2_first_pos<self.d2_count else (self.d2_count-1 if self.d2_count else 0)
        self.d2_last_pos =  d2_MAXITEMS*self.page_num - 1;
        self.d2_last_pos = self.d2_last_pos if self.d2_last_pos<self.d2_count else self.d2_count
        self.d2_last_pos = self.d2_last_pos if self.d2_last_pos<self.d2_count else (self.d2_count-1 if self.d2_count else 0)
        
        self.num_pages = self.count//self.MAXITEMS + 1 if self.count%self.MAXITEMS else 0
        self.firstpage = self.page_num - self.HALF_PAGES_LINK
+1 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ SOPDS_AUTH = True
SOPDS_SCAN_SHED_MIN ='0'
SOPDS_SCAN_SHED_HOUR ='0,12'
SOPDS_INPX_ENABLE = False
SOPDS_MAXITEMS = 4

#Конвертеры EPUB и MOBI
#SOPDS_FB2TOEPUB = os.path.join(BASE_DIR,'convert/fb2toepub/unix_dist/fb2toepub')
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
  <h5 id="DeleteBookModalTitle">{% trans "Confirm the deletion of the book to your bookshelf." %}</h5>
  <table><tr>	
  <td width="100px" style="padding:0rem 0rem;">
      <img src="#" id="DeleteBook_image" style="max-height: 100px; max-width: 100px">
      <img src="" id="DeleteBook_image" style="max-height: 100px; max-width: 100px">
  </td> 
  <td style="font-size:100%; padding:3px">
      <p id="DeleteBook_title"></p>