Skip to content

Commit

Permalink
Upgraded the Taggable and Screencast plugins. Also added 'browse tags…
Browse files Browse the repository at this point in the history
…' pages to both the plugins and screencasts sections of the site.
  • Loading branch information
pledbrook committed Feb 10, 2011
1 parent 5940f26 commit bacaa37
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 4 deletions.
4 changes: 2 additions & 2 deletions grails-app/conf/BuildConfig.groovy
Expand Up @@ -33,13 +33,13 @@ grails.project.dependency.resolution = {
":rateable:0.6.2",
":resources:1.0-RC2-SNAPSHOT",
":richui:0.6",
":screencasts:0.5",
":screencasts:0.5.1",
":searchable:0.5.5.1",
":shiro:1.1.1",
":simple-blog:0.1.5",
":springcache:1.2",
":spring-events:1.0",
":taggable:0.6.2",
":taggable:0.6.3",
":yui:2.7.0.1",
":zipped-resources:1.0-RC1"

Expand Down
2 changes: 2 additions & 0 deletions grails-app/conf/UrlMappings.groovy
Expand Up @@ -35,6 +35,7 @@ class UrlMappings {
"/plugin/showComment/$id"(controller: "plugin", action: "showComment")
"/plugins/category/$category"(controller: "plugin", action: "home")
"/plugins/tag/$tagName"(controller: "plugin", action: "browseByTag")
"/plugins/tags"(controller: "plugin", action: "browseTags")

"/content/postComment/$id"(controller: "content", action:"postComment")

Expand Down Expand Up @@ -65,6 +66,7 @@ class UrlMappings {
"/previous/$id/$number"(controller: "content", action: "previousWikiVersion")

"/screencasts"(controller:"screencast", action:"list")
"/screencasts/tags"(controller:"screencast", action:"browseTags")
"/screencast/save"(controller:"screencast", action:"save")
"/screencast/search"(controller:"screencast", action:"search")
"/screencast/update"(controller:"screencast", action:"update")
Expand Down
11 changes: 11 additions & 0 deletions grails-app/controllers/org/grails/plugin/PluginController.groovy
Expand Up @@ -24,6 +24,7 @@ class PluginController extends BaseWikiController {
static int PORTAL_MAX_RESULTS = 5
static int PORTAL_MIN_RATINGS = 1

def taggableService
def wikiPageService
def pluginService
def commentService
Expand Down Expand Up @@ -342,6 +343,16 @@ class PluginController extends BaseWikiController {
}
}

/**
* Displays a cloud of all the tags attached to plugins.
*/
def browseTags = {
// Get hold of all the plugin tags. This service method returns a map of tag
// names to counts, i.e. how many plugins have been tagged with each tag.
def allPluginTags = taggableService.getTagCounts("plugin").sort()
[tags: allPluginTags]
}

def showComment = {
def link = CommentLink.findByCommentAndType(Comment.get(params.id), 'plugin', [cache:true])
def plugin = Plugin.get(link.commentRef)
Expand Down
1 change: 1 addition & 0 deletions grails-app/i18n/messages.properties
Expand Up @@ -75,6 +75,7 @@ user.email.unique=There is already a user with the specified e-mail registered w
auth.password.mismatch=Entered passwords do not match
auth.user.does.not.exist=User account not found when creating page, perhaps your session timed out?
screencasts.home.title=Grails Screencasts
screencasts.browse.tags=Screencast tags
screencasts.rss.feed.title=Grails Screencasts
screencasts.rss.feed.description=The latest screencasts from the Grails.org community
plugin.currentRelease.matches.invalid=Plugin version is not formatted properly. Should be MAJOR.MINOR.BUGFIX(-SNAPSHOT).
Expand Down
3 changes: 2 additions & 1 deletion grails-app/views/plugin/_searchBar.gsp
Expand Up @@ -2,5 +2,6 @@
<g:form name="pluginSearch" action="search">
<input class="searchInput" type="text" name="q" value="${q}"/>
<input class="searchButton" type="image" src="${resource(dir:'images/new/plugins/Buttons', file:'search_btn.png')}" value="Search"/>
or <g:link controller="plugin" action="browseTags">browse tags</g:link>
</g:form>
</div>
</div>
15 changes: 15 additions & 0 deletions grails-app/views/plugin/browseTags.gsp
@@ -0,0 +1,15 @@
<head>
<title>Plugins</title>
<meta content="pluginNav" name="layout"/>

<rateable:resources />
<link rel="stylesheet" href="${resource(dir: 'css', file: 'ratings.css')}"/>

</head>
<body>
<h2>Plugin tags</h2>
<site:tagCloud tags="${tags}"/>
</body>
</html>


42 changes: 42 additions & 0 deletions web-app/css/new/master.css
Expand Up @@ -344,3 +344,45 @@ h1, h2, h3, h4, h5, h6 {
}


/*
* The following tag clouds styles shouldn't really need the #contentCenter
* prefix, but without it they are overpowered by a '#contentBody li' style.
*/
#contentCenter ol.tagCloud {
list-style-type: none;
}

#contentCenter ol.tagCloud li {
display: inline-block;
padding: 3px;
}

#contentCenter ol.tagCloud li a {
text-decoration: none;
}

.ie6 #contentCenter ol.tagCloud li {
zoom: 1;
display: inline;
}

#contentCenter ol.tagCloud li.smallest {
font-size: 80%;
}

#contentCenter ol.tagCloud li.small {
font-size: 90%;
}

#contentCenter ol.tagCloud li.medium {
font-size: 100%;
}

#contentCenter ol.tagCloud li.large {
font-size: 120%;
}

#contentCenter ol.tagCloud li.largest {
font-size: 150%;
}

7 changes: 6 additions & 1 deletion web-app/css/new/plugins.css
Expand Up @@ -163,7 +163,7 @@ body {
#searchBar .searchInput {
margin: 15px 10px 15px 15px;
height: 20px;
width: 500px;
width: 390px;
border: none;
background: transparent;
color: #48802C;
Expand All @@ -176,6 +176,11 @@ body {
margin: 5px;
}

#searchBar a {
color: #48802C;
text-decoration: none;
}

#searchBar .searchButton {
width: 104px;
height: 36px;
Expand Down
3 changes: 3 additions & 0 deletions web-app/css/new/subpage.css
Expand Up @@ -244,6 +244,9 @@ textarea {
#contentBody #searchBox {
margin-bottom:30px;
}
#contentBody #searchBox div {
margin: 10px 0;
}
.screencasts .screencast h2 a {
color: #48802C; border: inherit; text-decoration: none;
}
Expand Down

0 comments on commit bacaa37

Please sign in to comment.