-
{this.props.count} item(s)
+ if(this.props.count === 0) {
+ return (
);
+ } else {
+ var firstPage = (
+
«
+ ),
+ previousPage = (
+
‹
+ ),
+ nextPage = (
+
›
+ ),
+ lastPage = (
+
»
+ );
-
-
- First page
- «
-
-
- Previous page
- ‹
-
+ if(this.props.count > this.props.limit) {
+ if(this.props.page > 1) {
+ previousPage = (
+
+ Previous page
+ ‹
+
+ );
+ }var last_page = Math.ceil(this.props.count / this.props.limit);
-
-
-
- of
-
- {Math.ceil(this.props.count / this.props.limit)}
+ if(this.props.page > 2) {
+ firstPage = (
+
+ First page
+ «
+
+ );
+ }
+
+ if(this.props.page < this.getLastPage()) {
+ nextPage = (
+
+ Next page
+ ›
+
+ );
+ }
+
+ if(this.props.page < this.getLastPage() - 1) {
+ lastPage = (
+
+ Last page
+ »
+
+ );
+ }
+ }
+
+ return (
+
+
{this.props.count} item(s)
+
+
+ {firstPage}
+ {previousPage}
+
+
+
+
+ of
+
+ {Math.ceil(this.props.count / this.props.limit)}
+
+
+ {nextPage}
+ {lastPage}
-
-
- Next page
- ›
-
-
- Last page
- »
-
-
-
- );
+
+ );
+ }
}
});
@@ -338,7 +382,7 @@ define('subscribers.listing',
return (