mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-17 03:47:58 +00:00
Merge pull request #220 from status-im/feature/pagination-#156
Correct 'Showing' label text
This commit is contained in:
commit
d3338d3eab
@ -2,6 +2,7 @@
|
|||||||
(:require [re-frame.core :as rf]
|
(:require [re-frame.core :as rf]
|
||||||
[commiteth.common :refer [moment-timestamp
|
[commiteth.common :refer [moment-timestamp
|
||||||
display-data-page
|
display-data-page
|
||||||
|
items-per-page
|
||||||
issue-url]]))
|
issue-url]]))
|
||||||
|
|
||||||
|
|
||||||
@ -43,14 +44,18 @@
|
|||||||
[:div.ui.tiny.circular.image
|
[:div.ui.tiny.circular.image
|
||||||
[:img {:src avatar-url}]]]]))
|
[:img {:src avatar-url}]]]]))
|
||||||
|
|
||||||
(defn bounties-list [{:keys [items item-count total-count] :as bounty-page-data}]
|
(defn bounties-list [{:keys [items item-count page-number total-count]
|
||||||
|
:as bounty-page-data}]
|
||||||
[:div.ui.container.open-bounties-container
|
[:div.ui.container.open-bounties-container
|
||||||
[:div.open-bounties-header "Bounties"]
|
[:div.open-bounties-header "Bounties"]
|
||||||
(if (empty? items)
|
(if (empty? items)
|
||||||
[:div.view-no-data-container
|
[:div.view-no-data-container
|
||||||
[:p "No recent activity yet"]]
|
[:p "No recent activity yet"]]
|
||||||
[:div [:div.item-counts-label
|
[:div
|
||||||
[:span (str "Showing " item-count " of " total-count)]]
|
(let [left (inc (* (dec page-number) items-per-page))
|
||||||
|
right (dec (+ left item-count))]
|
||||||
|
[:div.item-counts-label
|
||||||
|
[:span (str "Showing " left "-" right " of " total-count)]])
|
||||||
(display-data-page bounty-page-data bounty-item :set-bounty-page-number)])])
|
(display-data-page bounty-page-data bounty-item :set-bounty-page-number)])])
|
||||||
|
|
||||||
(defn bounties-page []
|
(defn bounties-page []
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
(defn issue-url [owner repo number]
|
(defn issue-url [owner repo number]
|
||||||
(str "https://github.com/" owner "/" repo "/issues/" number))
|
(str "https://github.com/" owner "/" repo "/issues/" number))
|
||||||
|
|
||||||
(def items-per-page 20)
|
(def items-per-page 15)
|
||||||
|
|
||||||
(defn draw-page-numbers [page-number page-count set-page-kw]
|
(defn draw-page-numbers [page-number page-count set-page-kw]
|
||||||
"Draw page numbers for the pagination component.
|
"Draw page numbers for the pagination component.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user