Code refactoring. Changed design for index page.

Minor changes...
This commit is contained in:
Prominence
2016-07-10 15:00:30 +03:00
parent c05cf24ba4
commit 34048f9525
22 changed files with 132 additions and 100 deletions
+5 -1
View File
@@ -5,9 +5,13 @@
<title><g:layoutTitle default="Translations overview" /></title>
<r:layoutResources/>
</head>
<g:layoutBody />
<r:layoutResources/>
<link rel="stylesheet" href="${resource(dir: 'css', file: 'translations.css')}" type="text/css">
<body>
<div class="container main-container">
<g:layoutBody />
</div>
</body>
</html>
@@ -0,0 +1,63 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<meta name="layout" content="main"/>
<title><g:message code="plugin.translations.overview.index.page.title" /></title>
<r:require modules="bootstrap"/>
</head>
<body>
<div class="raw">
<h2 align="center"><g:message code="plugin.translations.overview.index.page.title"/></h2>
<g:if test="${message}">
<div class="alert alert-danger">
${message}
</div>
</g:if>
<g:if test="${bundles}">
<table class="table table-hover">
<thead>
<tr>
<td>#</td>
<td width="95%" colspan="2">
<g:message code="plugin.translations.header.bundleName"/>
</td>
</tr>
</thead>
<tbody>
<g:each in="${bundles}" var="bundle" status="index">
<tr>
<td width="5%">
${index + 1}
</td>
<td width="75%">
<b>${bundle.name}</b>
</td>
<td>
<div class="action-buttons">
<g:link action="edit" params="${[bundleName: bundle.name]}"
class="btn btn-default">
<g:message code="plugin.translations.action.edit"/>
</g:link>
<g:link action="export" params="${[bundleName: bundle.name]}"
class="btn btn-primary">
<g:message code="plugin.translations.action.export"/>
</g:link>
</div>
</td>
</tr>
</g:each>
</tbody>
</table>
<div class="total">
<g:message code="plugin.translations.totalBundles" args="${[bundles.size()]}"/>
</div>
</g:if>
<g:else>
<div class="alert alert-warning">
<g:message code="plugin.translations.message.noBundles"/>
</div>
</g:else>
</div>
</body>
</html>
@@ -1,27 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<meta name="layout" content="main"/>
<title><g:message code="plugin.translations.overview.index.page.title" /></title>
<r:require modules="bootstrap"/>
</head>
<body>
<g:if test="${message}">
<div class="alert alert-danger">
${message}
</div>
</g:if>
<g:if test="${bundles}">
<ol>
<g:each in="${bundles}" var="bundle">
<li><g:link action="show" params="${[bundleName: bundle.name]}" >${bundle.name}</g:link></li>
</g:each>
</ol>
<g:message code="plugin.translations.totalBundles" args="${[bundles.size()]}"/>
</g:if>
<g:else>
There is no bundles!
</g:else>
</body>
</html>
@@ -1,38 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<meta name="layout" content="main"/>
<title><g:message code="plugin.translations.overview.show.page.title" args="${[bundle.name]}" /></title>
<r:require modules="bootstrap"/>
</head>
<body>
<h1><g:message code="plugin.translations.overview.show.page.title" args="${[bundle.name]}" /></h1>
<br/>
<table>
<thead>
<tr>
<g:each in="${bundle.languages}" var="language">
<th>${language.languageTag.toUpperCase()}</th>
</g:each>
</tr>
</thead>
<tbody>
<tr>
<g:each in="${bundle.languages}" var="language">
<td>
<g:each in="${language.translations}" var="translation">
${translation.key} = ${translation.value} </br>
</g:each>
</td>
</g:each>
</tr>
<tr>
<g:each in="${bundle.languages}" var="language">
<td><g:message code="plugin.translations.totalRecords" args="${language.translations.size() ?: '0'}"/></td>
</g:each>
</tr>
</tbody>
</table>
</body>
</html>