Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gabs #323

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open

Gabs #323

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ddbe833
New and modified scenarios in Funder and Member features
cb16 Oct 27, 2014
6a68595
Create Publication.feature
gabrielamota29 Oct 27, 2014
10b724f
Update and rename Publication.feature to Publicacao.feature
gabrielamota29 Oct 27, 2014
612936f
Update Article.feature
gabrielamota29 Oct 27, 2014
b913d7d
Update Article.feature
gabrielamota29 Oct 27, 2014
92de7d4
Update Article.feature
gabrielamota29 Oct 28, 2014
0cf5a3f
Book GUI scenarios added
Oct 29, 2014
4f0160a
Articles Features modified
Oct 29, 2014
0440dff
Dissertation GUI scenarios modified
Oct 29, 2014
4c84b90
Dissertation Controller scenarios modified
Oct 29, 2014
129ffeb
Update Publicacao.feature
gabrielamota29 Oct 29, 2014
85ace63
Update Article.feature
gabrielamota29 Oct 29, 2014
e42a2ef
Update Dissertacao.feature
viniciusmlira Oct 29, 2014
fae0c0c
Update Thesis.feature
viniciusmlira Oct 29, 2014
cbc72e8
Update Thesis.feature
viniciusmlira Oct 29, 2014
f03cf2f
Update Thesis.feature
viniciusmlira Oct 29, 2014
2245fb9
Update Publicacao.feature
viniciusmlira Oct 29, 2014
162921f
Update Dissertacao.feature
viniciusmlira Oct 29, 2014
843ad93
Introdução da classe magazine publication, testes no site não estão s…
gabrielamota29 Nov 11, 2014
d5774f5
Book GUI Test Steps added
Nov 12, 2014
9b419f4
Duplicate test removed
Nov 13, 2014
2b740e4
Update ThesisSteps.groovy
viniciusmlira Nov 13, 2014
8e13e05
Criação e modificação de cenários
rjoSooares Nov 21, 2014
c9cb68f
fixed scenario: upload dissertation without a file
Nov 22, 2014
025d563
Scenario test: Delete dissertation
Nov 22, 2014
bb8dc8b
Implementação dos Testes
rjoSooares Nov 22, 2014
f8c7a33
Update DissertacaoSteps.groovy
viniciusmlira Nov 22, 2014
03da0d5
Update ThesisSteps.groovy
viniciusmlira Nov 22, 2014
1cdb70d
Merge branch 'jonas'
Nov 23, 2014
453670d
Merge remote-tracking branch 'remotes/origin/Rodolfo'
Nov 23, 2014
8e21947
Merge with Vinicius Branch
Nov 23, 2014
564a657
Merge remote-tracking branch 'remotes/origin/cscbb'
Nov 23, 2014
8f586ef
Introdução da classe magazine publication com as classes outras neces…
gabrielamota29 Nov 23, 2014
b2eaf0c
Merge branches 'Gabs' and 'master' of https://github.com/brilacerda/r…
gabrielamota29 Nov 23, 2014
95ad3b0
Book marks added
Nov 24, 2014
ef71fee
Scenario 1 redefinido - Gabriela
gabrielamota29 Dec 3, 2014
e0b080f
Scenario 2 redefinido - Gabriela
gabrielamota29 Dec 3, 2014
6cbdf7f
Update Book.feature
gabrielamota29 Dec 11, 2014
78d7a93
O professor me passou que a classe magazine publication já estava imp…
gabrielamota29 Dec 29, 2014
cc2299b
Merge remote-tracking branch 'origin/Gabs' into Gabs
gabrielamota29 Dec 29, 2014
e12521a
Implementação de alguns steps pra o funcionamento dos testes. Sem suc…
gabrielamota29 Dec 29, 2014
d6d4024
$updateExistingBookWeb
gabrielamota29 Jan 19, 2015
9d540bf
Correção dos erros dos testes de BookSteps e adaptação de Book.feature
gabrielamota29 Jan 19, 2015
13a112a
Todos os testes criados para Book.feature incluindo os criados por mi…
gabrielamota29 Jan 20, 2015
d842158
new Books steps added
Jan 21, 2015
567777d
Merge remote-tracking branch 'origin/jonas' into jonas
Jan 21, 2015
dec7a3b
Update Book.feature
gabrielamota29 Jan 21, 2015
82d0ff3
Continuo tentando resolver o conflito de merge no Book.feature
gabrielamota29 Jan 21, 2015
20fb3fe
Merge branch 'Gabs' of https://github.com/brilacerda/rgms into Gabs
gabrielamota29 Jan 21, 2015
24911d4
Testing
Feb 2, 2015
676b179
Alteração em alguns cenários & testes visando melhorá-los e fazê-los …
gabrielamota29 Feb 6, 2015
84bcf6d
Merge branch 'jonas' of https://github.com/brilacerda/rgms into Gabs
gabrielamota29 Feb 6, 2015
249491e
Pequenos Ajustes em BookSteps, BookEditPage
gabrielamota29 Feb 6, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Grails Metadata file
#Thu Jun 06 10:16:12 GMT-03:00 2013
#Mon Oct 27 15:36:21 GMT-03:00 2014
app.grails.version=2.1.0
app.name=rgms
app.servlet.version=2.5
Expand Down
1 change: 1 addition & 0 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ grails.project.dependency.resolution = {
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
compile 'commons-codec:commons-codec:1.6'
test("org.codehaus.geb:geb-junit4:$gebVersion")
test("org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion")
test("org.seleniumhq.selenium:selenium-support:$seleniumVersion")
Expand Down
17 changes: 7 additions & 10 deletions grails-app/controllers/rgms/publication/BookController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ class BookController {

bookInstance = pb.extractAuthors(bookInstance)


if (!bookInstance.save(flush: true)) {
render(view: "create", model: [bookInstance: bookInstance])
return
}

flash.message = message(code: 'default.created.message', args: [message(code: 'book.label', default: 'Book'), bookInstance.id])
redirect(action: "show", id: bookInstance.id)
saveAndNotify(bookInstance, "create", 'default.created.message')
}

def show(Long id) {
Expand Down Expand Up @@ -80,12 +73,16 @@ class BookController {

bookInstance.properties = params

saveAndNotify(bookInstance, "edit", 'default.updated.message')
}

private saveAndNotify(Book bookInstance, viewParameter, codeParameter ) {
if (!bookInstance.save(flush: true)) {
render(view: "edit", model: [bookInstance: bookInstance])
render(view: viewParameter, model: [bookInstance: bookInstance])
return
}

flash.message = message(code: 'default.updated.message', args: [message(code: 'book.label', default: 'Book'), bookInstance.id])
flash.message = message(code: codeParameter, args: [message(code: 'book.label', default: 'Book'), bookInstance.id])
redirect(action: "show", id: bookInstance.id)
}

Expand Down
16 changes: 16 additions & 0 deletions grails-app/domain/rgms/member/Orientation.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ class Orientation {

}

static public def isFiltered(orientations,typeof) {
for (orientation in orientations) {
if(!(orientation.tipo).contains(typeof))
return false
}
return true
}

static public def isFiltered(orientations,supervised, tipo) {
for (orientation in orientations) {
if(!(orientation.orientador).contains(supervised))
return false
}
return true
}

String toString() {
return "Titulo = " + this.tituloTese + "; Orientador = " + this.orientador + "; Orientando: " + this.orientando
}
Expand Down
3 changes: 3 additions & 0 deletions grails-app/i18n/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: rgms.ShiroDbRealm

3 changes: 3 additions & 0 deletions grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,6 @@ default.researchproject.import.flashmessage.success = "The non existent Research
#if($researchLine)
default.researchline.import.flashmessage.success = "The non existent Research Line were successfully imported"
#end

#if($magazinePublication)
magazinePublication.label = "Magazine Publication"
3 changes: 2 additions & 1 deletion grails-app/i18n/messages_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,5 @@ default.researchproject.import.flashmessage.success = "Os Projetos de Pesquisa n

#if($researchLine)
default.researchline.import.flashmessage.success = "As linhas de pesquisa que não existiam foram importadas com sucesso"
#end
#end

10 changes: 10 additions & 0 deletions grails-app/views/book/_errors.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<g:if test="${flash.message}">
<div class="message" role="status">${flash.message}</div>
</g:if>
<g:hasErrors bean="${bookInstance}">
<ul class="errors" role="alert">
<g:eachError bean="${bookInstance}" var="error">
<li <g:if test="${error in org.springframework.validation.ObjectError}">data-field-id="${error.}"</g:if>><g:message error="${error}"/></li>
</g:eachError>
</ul>
</g:hasErrors>
52 changes: 52 additions & 0 deletions grails-app/views/magazinePublication/_form.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<%@ page import="rgms.publication.MagazinePublication" %>



<div class="fieldcontain ${hasErrors(bean: magazinePublicationInstance, field: 'name', 'error')} required">
<label for="name">
<g:message code="magazinePublication.name.label" default="Name" />
<span class="required-indicator">*</span>
</label>
<g:textField name="name" maxlength="50" required="" value="${magazinePublicationInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: magazinePublicationInstance, field: 'number', 'error')} required">
<label for="number">
<g:message code="magazinePublication.number.label" default="Number" />
<span class="required-indicator">*</span>
</label>
<g:field name="number" type="number" value="${magazinePublicationInstance.number}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: magazinePublicationInstance, field: 'page', 'error')} ">
<label for="page">
<g:message code="magazinePublication.page.label" default="Page" />

</label>
<g:textField name="page" value="${magazinePublicationInstance?.page}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: magazinePublicationInstance, field: 'place', 'error')} ">
<label for="place">
<g:message code="magazinePublication.place.label" default="Place" />

</label>
<g:textField name="place" value="${magazinePublicationInstance?.place}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: magazinePublicationInstance, field: 'month', 'error')} ">
<label for="month">
<g:message code="magazinePublication.month.label" default="Month" />

</label>
<g:textField name="month" value="${magazinePublicationInstance?.month}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: magazinePublicationInstance, field: 'year', 'error')} required">
<label for="year">
<g:message code="magazinePublication.year.label" default="Year" />
<span class="required-indicator">*</span>
</label>
<g:field name="year" type="number" value="${magazinePublicationInstance.year}" required=""/>
</div>

39 changes: 39 additions & 0 deletions grails-app/views/magazinePublication/create.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<%@ page import="rgms.publication.MagazinePublication" %>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'magazinePublication.label', default: 'MagazinePublication')}" />
<title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>
<a href="#create-magazinePublication" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
<div class="nav" role="navigation">
<ul>
<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
</ul>
</div>
<div id="create-magazinePublication" class="content scaffold-create" role="main">
<h1><g:message code="default.create.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
<div class="message" role="status">${flash.message}</div>
</g:if>
<g:hasErrors bean="${magazinePublicationInstance}">
<ul class="errors" role="alert">
<g:eachError bean="${magazinePublicationInstance}" var="error">
<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
</g:eachError>
</ul>
</g:hasErrors>
<g:form action="save" >
<fieldset class="form">
<g:render template="form"/>
</fieldset>
<fieldset class="buttons">
<g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" />
</fieldset>
</g:form>
</div>
</body>
</html>
43 changes: 43 additions & 0 deletions grails-app/views/magazinePublication/edit.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<%@ page import="rgms.publication.MagazinePublication" %>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'magazinePublication.label', default: 'MagazinePublication')}" />
<title><g:message code="default.edit.label" args="[entityName]" /></title>
</head>
<body>
<a href="#edit-magazinePublication" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
<div class="nav" role="navigation">
<ul>
<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
</ul>
</div>
<div id="edit-magazinePublication" class="content scaffold-edit" role="main">
<h1><g:message code="default.edit.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
<div class="message" role="status">${flash.message}</div>
</g:if>
<g:hasErrors bean="${magazinePublicationInstance}">
<ul class="errors" role="alert">
<g:eachError bean="${magazinePublicationInstance}" var="error">
<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
</g:eachError>
</ul>
</g:hasErrors>
<g:form method="post" >
<g:hiddenField name="id" value="${magazinePublicationInstance?.id}" />
<g:hiddenField name="version" value="${magazinePublicationInstance?.version}" />
<fieldset class="form">
<g:render template="form"/>
</fieldset>
<fieldset class="buttons">
<g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" />
<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" formnovalidate="" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
</fieldset>
</g:form>
</div>
</body>
</html>
66 changes: 66 additions & 0 deletions grails-app/views/magazinePublication/list.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

<%@ page import="rgms.publication.MagazinePublication" %>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'magazinePublication.label', default: 'MagazinePublication')}" />
<title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
<a href="#list-magazinePublication" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
<div class="nav" role="navigation">
<ul>
<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
</ul>
</div>
<div id="list-magazinePublication" class="content scaffold-list" role="main">
<h1><g:message code="default.list.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
<div class="message" role="status">${flash.message}</div>
</g:if>
<table>
<thead>
<tr>

<g:sortableColumn property="name" title="${message(code: 'magazinePublication.name.label', default: 'Name')}" />

<g:sortableColumn property="number" title="${message(code: 'magazinePublication.number.label', default: 'Number')}" />

<g:sortableColumn property="page" title="${message(code: 'magazinePublication.page.label', default: 'Page')}" />

<g:sortableColumn property="place" title="${message(code: 'magazinePublication.place.label', default: 'Place')}" />

<g:sortableColumn property="month" title="${message(code: 'magazinePublication.month.label', default: 'Month')}" />

<g:sortableColumn property="year" title="${message(code: 'magazinePublication.year.label', default: 'Year')}" />

</tr>
</thead>
<tbody>
<g:each in="${magazinePublicationInstanceList}" status="i" var="magazinePublicationInstance">
<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

<td><g:link action="show" id="${magazinePublicationInstance.id}">${fieldValue(bean: magazinePublicationInstance, field: "name")}</g:link></td>

<td>${fieldValue(bean: magazinePublicationInstance, field: "number")}</td>

<td>${fieldValue(bean: magazinePublicationInstance, field: "page")}</td>

<td>${fieldValue(bean: magazinePublicationInstance, field: "place")}</td>

<td>${fieldValue(bean: magazinePublicationInstance, field: "month")}</td>

<td>${fieldValue(bean: magazinePublicationInstance, field: "year")}</td>

</tr>
</g:each>
</tbody>
</table>
<div class="pagination">
<g:paginate total="${magazinePublicationInstanceTotal}" />
</div>
</div>
</body>
</html>
90 changes: 90 additions & 0 deletions grails-app/views/magazinePublication/show.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

<%@ page import="rgms.publication.MagazinePublication" %>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'magazinePublication.label', default: 'MagazinePublication')}" />
<title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
<a href="#show-magazinePublication" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
<div class="nav" role="navigation">
<ul>
<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
</ul>
</div>
<div id="show-magazinePublication" class="content scaffold-show" role="main">
<h1><g:message code="default.show.label" args="[entityName]" /></h1>
<g:if test="${flash.message}">
<div class="message" role="status">${flash.message}</div>
</g:if>
<ol class="property-list magazinePublication">

<g:if test="${magazinePublicationInstance?.name}">
<li class="fieldcontain">
<span id="name-label" class="property-label"><g:message code="magazinePublication.name.label" default="Name" /></span>

<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${magazinePublicationInstance}" field="name"/></span>

</li>
</g:if>

<g:if test="${magazinePublicationInstance?.number}">
<li class="fieldcontain">
<span id="number-label" class="property-label"><g:message code="magazinePublication.number.label" default="Number" /></span>

<span class="property-value" aria-labelledby="number-label"><g:fieldValue bean="${magazinePublicationInstance}" field="number"/></span>

</li>
</g:if>

<g:if test="${magazinePublicationInstance?.page}">
<li class="fieldcontain">
<span id="page-label" class="property-label"><g:message code="magazinePublication.page.label" default="Page" /></span>

<span class="property-value" aria-labelledby="page-label"><g:fieldValue bean="${magazinePublicationInstance}" field="page"/></span>

</li>
</g:if>

<g:if test="${magazinePublicationInstance?.place}">
<li class="fieldcontain">
<span id="place-label" class="property-label"><g:message code="magazinePublication.place.label" default="Place" /></span>

<span class="property-value" aria-labelledby="place-label"><g:fieldValue bean="${magazinePublicationInstance}" field="place"/></span>

</li>
</g:if>

<g:if test="${magazinePublicationInstance?.month}">
<li class="fieldcontain">
<span id="month-label" class="property-label"><g:message code="magazinePublication.month.label" default="Month" /></span>

<span class="property-value" aria-labelledby="month-label"><g:fieldValue bean="${magazinePublicationInstance}" field="month"/></span>

</li>
</g:if>

<g:if test="${magazinePublicationInstance?.year}">
<li class="fieldcontain">
<span id="year-label" class="property-label"><g:message code="magazinePublication.year.label" default="Year" /></span>

<span class="property-value" aria-labelledby="year-label"><g:fieldValue bean="${magazinePublicationInstance}" field="year"/></span>

</li>
</g:if>

</ol>
<g:form>
<fieldset class="buttons">
<g:hiddenField name="id" value="${magazinePublicationInstance?.id}" />
<g:link class="edit" action="edit" id="${magazinePublicationInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
</fieldset>
</g:form>
</div>
</body>
</html>
Loading