Skip to content

Commit

Permalink
agregado db
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloRN committed Sep 7, 2011
1 parent 162c242 commit 8eb62c3
Show file tree
Hide file tree
Showing 111 changed files with 3,577 additions and 406 deletions.
4 changes: 2 additions & 2 deletions apps/admin/modules/articulo/config/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ generator:
filter:
display:
- id
- aprobado
- prestado
- is_active
- formato_duro
- titulo
Expand All @@ -64,7 +64,7 @@ generator:
- updated_by
form:
display:
NONE: [aprobado, is_active, formato_duro]
NONE: [prestado, is_active, formato_duro, tags]
Slide: [slide_id_form, slide_id_view]
Others: [titulo, anno, resumen, idioma, palabras_claves, volumen, num_revista, pagina_inicial, pagina_final, issn]
class: ArticuloAdminForm
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/modules/autor/lib/AutorAdminForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AutorAdminForm extends BaseAutorForm
public function configure()
{
parent::configure();
$this->validatorSchema['nombre'] = new sfValidatorRegex(array ('pattern' => '(^[a-zA-Z]+$)', 'required' => false), array('invalid' => 'El nombre no debe contener n&uacutemeros o s&iacutembolos'));
$this->validatorSchema['apellidos'] = new sfValidatorRegex(array ('pattern' => '(^[a-zA-Z]+$)', 'required' => false), array('invalid' => 'Los apellidos no deben contener n&uacutemeros o s&iacutembolos'));
$this->validatorSchema['nombre'] = new sfValidatorRegex(array ('pattern' => '(^[a-zA-Z ]+$)', 'required' => false), array('invalid' => 'El nombre no debe contener n&uacutemeros o s&iacutembolos'));
$this->validatorSchema['apellidos'] = new sfValidatorRegex(array ('pattern' => '(^[a-zA-Z ]+$)', 'required' => false), array('invalid' => 'Los apellidos no deben contener n&uacutemeros o s&iacutembolos'));
}
}
4 changes: 2 additions & 2 deletions apps/admin/modules/monografia/config/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ generator:
- updated_by
form:
display:
NONE: [prestado, is_active, formato_duro]
NONE: [prestado, is_active, formato_duro, tags]
Pdf: [slide_id_form, slide_id_view]
Recurso: [titulo, anno, resumen, idioma, isbn, num_inventario, editorial, palabras_claves, total_paginas, tematicas_list, autors_list]
Recurso: [titulo, anno, resumen, idioma, ciudad_pub, isbn, num_inventario, editorial, palabras_claves, total_paginas, tematicas_list, autors_list]
class: monografiaAdminForm
fields:
anno: {label: A&ntildeo de publicaci&oacuten }
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/modules/patente/config/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ generator:
- updated_by
form:
display:
NONE: [prestado, is_active, formato_duro]
NONE: [prestado, is_active, formato_duro, tags]
Slide: [slide_id_form, slide_id_view]
Datos: [titulo, anno, resumen, idioma, palabras_claves, pais, institucion, total_paginas, num_internacional, tematicas_list]
class: PatenteAdminForm
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/modules/presentacion/config/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ generator:
filter:
display:
- id
- aprobado
- prestado
- is_active
- formato_duro
- titulo
Expand All @@ -58,7 +58,7 @@ generator:
- updated_by
form:
display:
NONE: [aprobado, is_active, formato_duro]
NONE: [prestado, is_active, formato_duro]
Slide: [slide_id_form, slide_id_view]
Others: [titulo, anno, resumen, idioma, palabras_claves, num_diapositivas, tematicas_list]
class: PresentacionAdminForm
Expand Down
5 changes: 2 additions & 3 deletions apps/admin/modules/tesis/config/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ generator:
- total_paginas
- ciudad
- institucion
- tutors_list
- tipo
- tutor
- slide_id
Expand All @@ -50,7 +49,7 @@ generator:
filter:
display:
- id
- aprobado
- prestado
- is_active
- formato_duro
- titulo
Expand All @@ -68,7 +67,7 @@ generator:
- updated_by
form:
display:
NONE: [aprobado, is_active, formato_duro]
NONE: [prestado, is_active, formato_duro, tags]
PDF: [slide_id_form, slide_id_view]
Datos: [titulo, anno, resumen, idioma, palabras_claves, departamento, ciudad, institucion, total_paginas, tutor, tipo, tematicas_list]
class: TesisAdminForm
Expand Down
4 changes: 3 additions & 1 deletion apps/front/config/dm/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ parameters:
search_document.options:
boost_values:
autors_list: 2
palabras_clave: 5
palabras_clave: 5
front_pager_view.options:
ajax: true
12 changes: 11 additions & 1 deletion apps/front/config/view.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@ default:
- markdown
- typography
- recursos

- lib.ui-datepicker
- jquery-ui-1.7.3.custom
- jquery.ui.timepicker.addon
javascripts:
- front
- lib.ui-core
- lib.ui-widget
- lib.ui-mouse
- lib.ui-datepicker
- jquery-ui-1.8.2.custom.min.js

- /dmCorePlugin/lib/jquery-ui/js/minified/jquery.ui.slider.min.js
- jquery.ui.timepicker.addon
has_layout: true
layout: layout
1 change: 1 addition & 0 deletions apps/front/modules/articulo/actions/actions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function executeFormWidget(dmWebRequest $request)
if ($request->hasParameter($form->getName()) && $form->bindAndValid($request))
{
$form->save();
$this->getUser()->setFlash('formulario_valido', true);
$this->redirectBack();
}

Expand Down
1 change: 1 addition & 0 deletions apps/front/modules/articulo/actions/components.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function executeShow()
$query = $this->getShowQuery();

$this->articulo = $this->getRecord($query);
$this->getUser()->setAttribute('recurso', $this->articulo);
}

public function executeForm()
Expand Down
6 changes: 5 additions & 1 deletion apps/front/modules/articulo/templates/_form.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php // Vars: $form

if ($sf_user->getFlash('formulario_valido'))
{
echo _tag('p.felicitaciones', 'Gracias, su tesis ha sido a&ntildeadida satisfactoriamente y ser&aacute publicada proximamente.');
}

echo $form;
97 changes: 96 additions & 1 deletion apps/front/modules/articulo/templates/_show.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,98 @@
<?php // Vars: $articulo
use_helper('Date');

echo $articulo;
echo _open('div.body.recurso');

// Wrap the title in a H1
echo _tag('h1.t_big','T&iacutetulo: '. $articulo->titulo);

// Open a P tag to display some article infos
if($articulo->createdBy){
echo _tag('p.recurso_infos',

_tag('span', 'Creado el: '.format_date($articulo->createdAt, 'D')).
' | '.
_tag('span', 'Creado por: '.$articulo->createdBy)
);}
else{

echo _tag('p.recurso_infos',

_tag('span', 'Creado el: '.format_date($articulo->createdAt, 'D')).
' | '.
_tag('span', 'Creado por: '.$articulo->updatedBy)
);
}



// render the article image.
// scale it to 200px width and height.
// give it the "image" CSS class.
//echo _media($article->Image)->size(200, 200)->set('.image');

// render article body processed with markdown.
if($articulo->resumen){

echo _tag('span.descriptor', 'Resumen: '. _tag('span.recurso_list', markdown($articulo->resumen, '.resumen')));}
else{
echo _tag('p.descriptor_rojo', 'Sin resumen');
}
echo _open('p');
echo _tag('span.descriptor', 'Palabras claves: '. _tag('span.recurso_list', $articulo->palabras_claves));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor', 'A&ntildeo de Publicaci&oacuten: '. _tag('span.recurso_list', $articulo->anno));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor', 'Volumen: '._tag('span.recurso_list', $articulo->volumen));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor', 'No. de revista: '._tag('span.recurso_list', $articulo->num_revista));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor', 'ISSN: '._tag('span.recurso_list', $articulo->issn));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor', 'Desde la p&aacutegina: '._tag('span.recurso_list', $articulo->pagina_inicial));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor', 'Hasta la p&aacutegina: '._tag('span.recurso_list', $articulo->pagina_final));
echo _close('p');
echo _open('p');
echo _tag('span.descriptor','Idioma: '. _tag('span.recurso_list', $articulo->idioma));
echo _close('p');
echo _open('p');
if($articulo->formato_duro){
//hidratando la consulta para saber si ya esta la solicitud
if ($articulo->prestado){

$records = dmDb::query('SolicitudPrestamo s')
->where('s.dm_user_id = ?', sfContext::getInstance()->getUser()->getUserId())
->andwhere('s.recurso_id = ?', $articulo->id)

->fetchRecords();
$cont = 0;
foreach($records as $record){
$cont++;
}
if($cont >= 1){
echo _tag('span.descriptor','Disponible: '. _tag('span.recurso_list', 'No '. _tag('span.recurso_list.aviso', 'Usted ser&aacute avisado cuando este recurso est&eacute disponible')));

}
else {

echo _tag('p.recurso_list','Disponible: No. '. _link('+/SolicitudPrestamo/solicitar')->text('Avisarme cuando est&eacute disponible') );

}
}
else {

echo _tag('p.recurso_list','Disponible: S&iacute');
}

}
else{
echo _link($articulo->Slide)->title('Descargar articulo')->set('.image_descargar')->text(_media('download.png')->alt('Descargar articulo'));
}
echo _close('div');
1 change: 1 addition & 0 deletions apps/front/modules/autor/actions/actions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function executeFormWidget(dmWebRequest $request)
if ($request->hasParameter($form->getName()) && $form->bindAndValid($request))
{
$form->save();
$this->getUser()->setFlash('formulario_valido', true);
$this->redirectBack();
}

Expand Down
5 changes: 4 additions & 1 deletion apps/front/modules/autor/templates/_form.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?php // Vars: $form

if ($sf_user->getFlash('formulario_valido'))
{
echo _tag('p.felicitaciones', 'El autor ha sido creado. Puede continuar creando autores o dirigirse a a&ntildeadir un recurso.');
}
echo $form;
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function executeFormWidget(dmWebRequest $request)
if ($request->hasParameter($form->getName()) && $form->bindAndValid($request))
{
$form->save();
$this->getUser()->setFlash('formulario_valido', true);
$this->redirectBack();
}

Expand Down
5 changes: 4 additions & 1 deletion apps/front/modules/bibliotecaPersonal/templates/_form.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?php // Vars: $form

if ($sf_user->getFlash('formulario_valido'))
{
echo _tag('p.felicitaciones', 'Gracias, su Biblioteca Personal ha sido a&ntildeadida satisfactoriamente y ser&aacute publicada proximamente.');
}
echo $form;
6 changes: 3 additions & 3 deletions apps/front/modules/bibliotecaPersonal/templates/_show.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php // Vars: $bibliotecaPersonal
use_helper('Date');

echo _open('div.clearfix');
echo _open('div.body.recurso');

// Wrap the title in a H1
echo _tag('h1.t_big','T&iacutetulo: '. $bibliotecaPersonal->titulo);
Expand Down Expand Up @@ -59,8 +59,8 @@
if ($bibliotecaPersonal->prestado){

$records = dmDb::query('SolicitudPrestamo s')
->where('s.dm_user_id = ?', 1)
->andwhere('s.recurso_id = ?', $bibliotecaPersonal)
->where('s.dm_user_id = ?', sfContext::getInstance()->getUser()->getUserId())
->andwhere('s.recurso_id = ?', $bibliotecaPersonal->id)

->fetchRecords();
$cont = 0;
Expand Down
2 changes: 1 addition & 1 deletion apps/front/modules/busqueda/templates/_form.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php // Vars: $form
if ($sf_user->getFlash('busqueda_form_valid'))
{
echo _tag('p.felicitaciones', 'Su solicitud ha sido enviada satisfactoriamente y será respondida con la mayor brevedad posible ');
echo _tag('p.felicitaciones', 'Su solicitud ha sido enviada satisfactoriamente y será respondida con la mayor brevedad posible.');
}

echo $form;
Expand Down
2 changes: 2 additions & 0 deletions apps/front/modules/dmUser/templates/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
if($sf_user->isAuthenticated())
{
$image = $sf_user->getUser()->get('Image');
_open('p.image.usuario');
echo _media($image)->size(50,60);
_close('p');
echo _tag('p.ya_registrado', __('Usted ya se encuentra registrado como "%username%", si no es "%username%" por favor cierre la sesi&oacuten e intente registrarse de nuevo', array('%username%' => $sf_user->getUsername())));

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public function executeFormWidget(dmWebRequest $request)
if ($request->hasParameter($form->getName()) && $form->bindAndValid($request))
{
$form->save();
$this->getUser()->setFlash('formulario_valido',true);
$this->redirectBack();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public function executeShow()
$query = $this->getShowQuery();

$this->documentoLegal = $this->getRecord($query);
$this->getUser()->setAttribute('recurso', $this->documentoLegal);
}

public function executeForm()
Expand Down
5 changes: 4 additions & 1 deletion apps/front/modules/documentoLegal/templates/_form.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?php // Vars: $form

if ($sf_user->getFlash('formulario_valido'))
{
echo _tag('p.felicitaciones', 'Gracias, su Documento Legal ha sido a&ntildeadido satisfactoriamente y ser&aacute publicado proximamente');
}
echo $form;
Loading

0 comments on commit 8eb62c3

Please sign in to comment.