Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/ApplicationPage.qml
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Line(s) | 109 | ColumnLayout { | |||
---|---|---|---|---|---|
201 | } | 201 | } | ||
202 | LinkButton { | 202 | LinkButton { | ||
203 | text: i18n("Be the first to write a review!") | 203 | text: i18n("Be the first to write a review!") | ||
204 | onClicked: reviewsSheet.openReviewDialog() | 204 | onClicked: reviewsSheet.openReviewDialog() | ||
205 | visible: !commentsButton.visible && reviewsModel.backend && reviewsModel.backend.isResourceSupported(appInfo.application) | 205 | visible: !commentsButton.visible && reviewsModel.backend && reviewsModel.backend.isResourceSupported(appInfo.application) | ||
206 | } | 206 | } | ||
207 | LinkButton { | 207 | LinkButton { | ||
208 | id: commentsButton | 208 | id: commentsButton | ||
209 | readonly property QtObject rating: appInfo.application.rating | 209 | visible: reviewsModel.count > 0 | ||
210 | visible: rating && rating.ratingCount>0 && reviewsModel.count | 210 | text: i18n("Show all %1 reviews...", reviewsModel.count) | ||
211 | text: i18n("Show more reviews (%1)...", rating ? reviewsModel.count : 0) | | |||
212 | 211 | | |||
213 | onClicked: { | 212 | onClicked: { | ||
214 | reviewsSheet.open() | 213 | reviewsSheet.open() | ||
215 | } | 214 | } | ||
216 | Layout.bottomMargin: Kirigami.Units.largeSpacing | 215 | Layout.bottomMargin: Kirigami.Units.largeSpacing | ||
217 | } | 216 | } | ||
218 | 217 | | |||
219 | Rectangle { | 218 | Rectangle { | ||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |