Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-3212 - replacing twitter with vimeo
Browse files Browse the repository at this point in the history
  • Loading branch information
vrockai authored and lucasponce committed Jul 30, 2013
1 parent 95cfe38 commit 89d067d
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 35 deletions.
Expand Up @@ -47,9 +47,9 @@ public class CommunityPortlet extends GenericPortlet {

private String DEFAULT_URL = "/#";
private String URL_RSS_BLOG = "url.rss.blog";
private String URL_RSS_TWITTER = "url.rss.twitter";
private String URL_RSS_VIMEO = "url.rss.vimeo";
private String URL_CONTENT_BLOG = "url.blog";
private String URL_CONTENT_TWITTER = "url.twitter";
private String URL_CONTENT_VIMEO = "url.vimeo";
private String PFX_BLOG_AUTHOR = "pfx.url.author";
private static final Logger log = LoggerFactory.getLogger(CommunityPortlet.class);

Expand Down Expand Up @@ -96,14 +96,14 @@ public void serveResource(ResourceRequest request, ResourceResponse response) th

PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/feedBlog.jsp");
prd.include(request, response);
} else if ("twitter".equals(contentType)) {
String urlRssTwitter = portletPreferences.getValue(URL_RSS_TWITTER, DEFAULT_URL);
String urlContentTwitter = portletPreferences.getValue(URL_CONTENT_TWITTER, DEFAULT_URL);
} else if ("vimeo".equals(contentType)) {
String urlRssVimeo = portletPreferences.getValue(URL_RSS_VIMEO, DEFAULT_URL);
String urlContentVimeo = portletPreferences.getValue(URL_CONTENT_VIMEO, DEFAULT_URL);

RssReaderBean gateInTwitterRssReader = makeReaderBean(urlRssTwitter, urlContentTwitter, 2, null);
request.setAttribute("twitterRSSBean", gateInTwitterRssReader);
RssReaderBean gateInVimeoRssReader = makeReaderBean(urlRssVimeo, urlContentVimeo, 2, null);
request.setAttribute("vimeoRSSBean", gateInVimeoRssReader);

PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/feedTwitter.jsp");
PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/feedVimeo.jsp");
prd.include(request, response);
}
}
Expand Down
Expand Up @@ -7,8 +7,8 @@ contribute.link=Contribute \u00bb
conversation.label=Conversation
conversation.blog.label=Blog Entries
conversation.blog.link=All blog posts \u00bb
conversation.twitter.label=Latest Tweet
conversation.twitter.link=All tweets \u00bb
conversation.vimeo.label=Latest Video
conversation.vimeo.link=All videos \u00bb
conversation.io.error=Unable to read properly from the specified source:

documentation.label=Documentation
Expand Down
Expand Up @@ -7,8 +7,8 @@ contribute.link=Contribuisci \u00bb
conversation.label=Conversazione
conversation.blog.label=Entry del Blog
conversation.blog.link=Tutti i post del blog \u00bb
conversation.twitter.label=Ultimi Tweet
conversation.twitter.link=Tutti i tweet \u00bb
conversation.vimeo.label=Ultimi Video
conversation.vimeo.link=Tutti i video \u00bb

documentation.label=Documentazione
documentation.content=Le informazioni di cui hai bisogno sulle ultime versioni stabili e di sviluppo.
Expand Down
Expand Up @@ -30,17 +30,17 @@
<value>https://community.jboss.org/community/feeds/blogs?community=2183</value>
</preference>
<preference>
<name>url.rss.twitter</name>
<value>https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=gatein</value>
<name>url.rss.vimeo</name>
<value>http://vimeo.com/channels/gatein/videos/rss</value>
</preference>

<preference>
<name>url.blog</name>
<value>https://community.jboss.org/en/gatein?view=blog#/?tagSet=undefined</value>
</preference>
<preference>
<name>url.twitter</name>
<value>https://twitter.com/gatein</value>
<name>url.vimeo</name>
<value>https://vimeo.com/channels/gatein/</value>
</preference>

<preference>
Expand Down
Expand Up @@ -9,7 +9,7 @@
font-size: 12px;
}

.gtnResponsiveCommunityPortlet #conversation #tweets-content-mobile .info span,
.gtnResponsiveCommunityPortlet #conversation #vimeo-content-mobile .info span,
.gtnResponsiveCommunityPortlet #conversation .info > span + span,
.gtnResponsiveCommunityPortlet #conversation .info a {
font-size: 11px;
Expand Down
Expand Up @@ -144,8 +144,8 @@
background-image: url("../images/rss.png");
}

.gtnResponsiveCommunityPortlet .icon-twitter {
background-image: url("../images/twitter.png");
.gtnResponsiveCommunityPortlet .icon-vimeo {
background-image: url("../images/vimeo.png");
}

.gtnResponsiveCommunityPortlet .icon-gray {
Expand All @@ -156,7 +156,7 @@
}

.gtnResponsiveCommunityPortlet #blog-content-mobile,
.gtnResponsiveCommunityPortlet #tweets-content-mobile {
.gtnResponsiveCommunityPortlet #vimeo-content-mobile {
overflow: hidden;
padding: 0 3.57143%;
}
Expand Down Expand Up @@ -202,7 +202,7 @@
margin-right: 0.25em; /* orientation=lt */
}

.gtnResponsiveCommunityPortlet #conversation #tweets-content-mobile .info span {
.gtnResponsiveCommunityPortlet #conversation #vimeo-content-mobile .info span {
font-size: 0.75em;
color:#999;
}
Expand All @@ -215,7 +215,7 @@
line-height: 1.53846153846154em;
}

.gtnResponsiveCommunityPortlet #conversation #tweets-content-mobile {
.gtnResponsiveCommunityPortlet #conversation #vimeo-content-mobile {
display:none;
}

Expand All @@ -224,7 +224,7 @@
color: #e33;
}

.gtnResponsiveCommunityPortlet #tweets-content-mobile .errorPane a,
.gtnResponsiveCommunityPortlet #vimeo-content-mobile .errorPane a,
.gtnResponsiveCommunityPortlet .errorPane > a,
.gtnResponsiveCommunityPortlet .errorPane > p {
font-size: 0.875em;
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -21,8 +21,8 @@
var feedBlog = $(".gtnResponsiveCommunityPortlet #blog-content-mobile");
loadWithAjax(feedBlog);

var feedTwitter = $(".gtnResponsiveCommunityPortlet #tweets-content-mobile");
loadWithAjax(feedTwitter);
var feedVimeo = $(".gtnResponsiveCommunityPortlet #vimeo-content-mobile");
loadWithAjax(feedVimeo);

$(".gtnResponsiveCommunityPortlet #conversation-accordion").accordion();

Expand Down
Expand Up @@ -50,12 +50,12 @@
</div>

<div class="accordion-group">
<a href="#<portlet:namespace/>tweets-content-mobile" id="<portlet:namespace/>tweets-content-mobile" class="accordion-toggle">
<i class="icon-twitter icon-gray"></i>${resourceBundle.getString("conversation.twitter.label")}
<a href="#<portlet:namespace/>vimeo-content-mobile" id="<portlet:namespace/>vimeo-content-mobile" class="accordion-toggle">
<i class="icon-vimeo icon-gray"></i>${resourceBundle.getString("conversation.vimeo.label")}
</a>
<div class="accordion-body collapse" id="tweets-content-mobile">
<div class="accordion-body collapse" id="vimeo-content-mobile">
<portlet:resourceURL var="ajaxResourceUrl">
<portlet:param name="type" value="twitter" />
<portlet:param name="type" value="vimeo" />
</portlet:resourceURL>
<a href="${ajaxResourceUrl}" class="ajaxLoader">${resourceBundle.getString("ajax.load")}</a>
</div>
Expand Down
Expand Up @@ -8,26 +8,26 @@
<c:set var="resourceBundle" value="${portletConfig.getResourceBundle(resourceRequest.locale)}"/>

<c:choose>
<c:when test="${twitterRSSBean.valid}">
<c:when test="${vimeoRSSBean.valid}">
<ul>
<c:forEach var="twitterTweet" items="${twitterRSSBean.feedTitles}">
<c:forEach var="vimeoItem" items="${vimeoRSSBean.feedTitles}">
<li>
<h6><a href="${twitterTweet.link}">${twitterTweet.title}</a></h6>
<h6><a href="${vimeoItem.link}">${vimeoItem.title}</a></h6>

<div class="info">
<span>
<fmt:formatDate value="${twitterTweet.publishedDate}" pattern="dd MMM"/>
<fmt:formatDate value="${vimeoItem.publishedDate}" pattern="dd MMM"/>
</span>
</div>
</li>
</c:forEach>
</ul>
<a href="${twitterRSSBean.contentSource}">${resourceBundle.getString("conversation.twitter.link")}</a>
<a href="${vimeoRSSBean.contentSource}">${resourceBundle.getString("conversation.vimeo.link")}</a>
</c:when>
<c:otherwise>
<div class="errorPane">
<p>${resourceBundle.getString("conversation.io.error")}</p>
<a href="${twitterRSSBean.sourceIO}">${twitterRSSBean.sourceIO}</a>
<a href="${vimeoRSSBean.sourceIO}">${vimeoRSSBean.sourceIO}</a>
</div>
</c:otherwise>
</c:choose>

0 comments on commit 89d067d

Please sign in to comment.