MaxSem has submitted this change and it was merged.

Change subject: Story 757: Add text to upload CTA in lists of articles
......................................................................


Story 757: Add text to upload CTA in lists of articles

For articles which have no images add the tagline
'Visit this page to add an image' above the distance

Makes call to action more explicit

Change-Id: I64e7ba0e831d9d954749fd5b4a6d3691168d95bb
---
M MobileFrontend.i18n.php
M MobileFrontend.php
M javascripts/specials/nearby.js
M templates/articleList.html
4 files changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Siebrand: Looks good to me, but someone else must approve
  awjrichards: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index c24cf3e..312d020 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -141,6 +141,7 @@
        'mobile-frontend-nearby-refresh' => 'We found a more accurate location 
for you. Click here to refresh the list of nearby pages',
        'mobile-frontend-nearby-error' => 'An unexpected error occurred whilst 
trying to find pages nearby',
        'mobile-frontend-nearby-link' => 'Read this page in full',
+       'mobile-frontend-needs-photo' => 'Visit this page to add an image',
 
        // image donation
        'mobile-frontend-donate-image-login' => 'You must be logged in to see 
your uploads.',
@@ -491,6 +492,7 @@
        'mobile-frontend-nearby-refresh' => 'Text of toast notification message 
shown when user moved and the list can be refreshed.',
        'mobile-frontend-nearby-error' => 'Text of generic error message when 
querying geodata api',
        'mobile-frontend-nearby-link' => 'Text of link that takes user to full 
page',
+       'mobile-frontend-needs-photo' => 'Text that appears on page item in 
Special:Nearby list telling user to upload a photo',
        'mobile-frontend-donate-image-login' => 'Title for 
[[Special:UserLogin]] when being redirected to [[Special:Uploads]].
 
 Used when the user is not logged in.
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 1f09d97..61b8501 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -633,6 +633,7 @@
                'mobile-frontend-nearby-noresults',
                'mobile-frontend-ajax-preview-loading',
                'mobile-frontend-nearby-link',
+               'mobile-frontend-needs-photo',
        ),
        'styles' => array(
                'stylesheets/specials/watchlist.css',
diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js
index 982db37..f07a32c 100644
--- a/javascripts/specials/nearby.js
+++ b/javascripts/specials/nearby.js
@@ -119,6 +119,7 @@
                                page.pageimageClass = thumb.width > 
thumb.height ? 'listThumbH' : 'listThumbV';
                        } else {
                                page.pageimageClass = 'needsPhoto';
+                               page.cta = mw.msg( 
'mobile-frontend-needs-photo' );
                        }
                        page.url = M.history.getArticleUrl( page.title );
                        if ( page.coordinates ) { // FIXME: protect against bug 
47133 (remove when resolved)
diff --git a/templates/articleList.html b/templates/articleList.html
index 84aa884..18db2f3 100644
--- a/templates/articleList.html
+++ b/templates/articleList.html
@@ -4,6 +4,7 @@
                <a href="{{url}}" class="title">
                        <div class="listThumb {{pageimageClass}}" 
style="{{listThumbStyleAttribute}}"></div>
                        <h2>{{title}}</h2>
+                       {{#cta}}<div class="info">{{cta}}</div>{{/cta}}
                        <div class="info proximity">{{proximity}}</div>
                </a>
        </li>

-- 
To view, visit https://gerrit.wikimedia.org/r/62820
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I64e7ba0e831d9d954749fd5b4a6d3691168d95bb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to