equal
deleted
inserted
replaced
133 yield prev |
133 yield prev |
134 |
134 |
135 @property |
135 @property |
136 def page_count (self) : |
136 def page_count (self) : |
137 """ |
137 """ |
138 Returns the number of pages needed to show this folder's images |
138 Returns the number of pages needed to show this folder's images or subfolders. May be zero, one or more. |
139 """ |
139 """ |
|
140 |
|
141 if self.images : |
|
142 return int(math.ceil(len(self.images) / float(self.config.images_per_page))) |
|
143 |
|
144 elif self.subfolders : |
|
145 # paginate these? |
|
146 return 1 |
140 |
147 |
141 return int(math.ceil(len(self.images) / float(self.config.images_per_page))) |
148 else : |
|
149 # nothing to render, really |
|
150 return 0 |
142 |
151 |
143 def images_for_page (self, page) : |
152 def images_for_page (self, page) : |
144 """ |
153 """ |
145 Returns the list of Images to be displayed for the given page, if any |
154 Returns the list of Images to be displayed for the given page, if any |
146 """ |
155 """ |