Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix pagination of pending plugin approvals

  • Loading branch information...
commit 8b08026194365f3e229261e1461a26c9030b6315 1 parent 8dd6e6f
@graemerocher graemerocher authored
View
4 grails-app/controllers/org/grails/content/ContentPendingApprovalController.groovy
@@ -16,8 +16,8 @@ class ContentPendingApprovalController {
pendingItems.addAll(WebSite.pending.list())
pendingItems.addAll(Testimonial.pending.list())
pendingItems = pendingItems.sort { it.dateCreated }
-
- [pendingItems: pendingItems]
+ def pendingPlugins = org.grails.plugin.PluginPendingApproval.pending.list()
+ [pendingItems: pendingItems, pendingPlugins:pendingPlugins]
}
def approve(Long id, String type) {
View
12 grails-app/views/contentPendingApproval/_pendingApprovals.gsp
@@ -29,5 +29,17 @@
</td>
</tr>
</g:each>
+ <g:each in="${pendingPlugins}" var="plugin">
+ <tr>
+ <td><g:link controller="pluginPendingApproval" action="show" id="${plugin.id}">${plugin.name}</g:link></td>
+ <td><common:approvalStatus status="${plugin.status}" type="badge" /></td>
+ <td>Plugin</td>
+ <td>
+ <g:link controller="pluginPendingApproval" action="show" id="${plugin.id}"
+ class="btn btn-primary">View</g:link>
+
+ </td>
+ </tr>
+ </g:each>
</tbody>
</table>
View
6 grails-app/views/pluginPendingApproval/list.gsp
@@ -42,4 +42,8 @@
</tr>
</g:each>
</tbody>
-</table>
+</table>
+<div class="pagination">
+ <g:paginate total="${pluginPendingApprovalTotal}"/>
+</div>
+</bod>
Please sign in to comment.
Something went wrong with that request. Please try again.