merged new theme and drupal modules updates

parents 36ec2f09 aca496db
---
# Output debugging info
# loglevel: debug
......@@ -112,4 +113,3 @@ scripts:
tab: true
tooltip: true
util: true
......@@ -3,3 +3,5 @@ type: module
description: EPAL Registration
core: 8.x
package: EPAL
dependencies:
- epalreadydata
\ No newline at end of file
This diff is collapsed.
......@@ -45,6 +45,8 @@ use Drupal\user\UserInterface;
* "uid" = "user_id",
* "langcode" = "langcode",
* "status" = "status",
* "student_id" = "student_id",
* "courseField_id" = "courseField_id",
* },
* links = {
* "canonical" = "/admin/structure/epal_student_course_field/{epal_student_course_field}",
......@@ -84,8 +86,8 @@ class EpalStudentCourseField extends ContentEntityBase implements EpalStudentCou
$this->set('name', $name);
return $this;
}
/**
/**
* {@inheritdoc}
*/
public function getCreatedTime() {
......@@ -145,6 +147,38 @@ class EpalStudentCourseField extends ContentEntityBase implements EpalStudentCou
return $this;
}
/**
* {@inheritdoc}
*/
public function getCourseField_id() {
return $this->get('courseField_id')->getString();
}
/**
* {@inheritdoc}
*/
public function setCourseField_id($name) {
$this->set('courseField_id', $name);
return $this;
}
/**
* {@inheritdoc}
*/
public function getStudent_id() {
return $this->get('student_id')->getString();
}
/**
* {@inheritdoc}
*/
public function setStudent_id($name) {
$this->set('student_id', $name);
return $this;
}
/**
* {@inheritdoc}
*/
......@@ -152,14 +186,14 @@ class EpalStudentCourseField extends ContentEntityBase implements EpalStudentCou
$fields = parent::baseFieldDefinitions($entity_type);
$fields['user_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Authored by'))
->setDescription(t('The user ID of author of the Epal student course field entity.'))
->setLabel(t('Δημιουργός'))
->setDescription(t('Δημιουργός.'))
->setRevisionable(TRUE)
->setSetting('target_type', 'user')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'hidden',
'label' => 'above',
'type' => 'author',
'weight' => 0,
))
......@@ -177,8 +211,8 @@ class EpalStudentCourseField extends ContentEntityBase implements EpalStudentCou
->setDisplayConfigurable('view', TRUE);
$fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Name'))
->setDescription(t('The name of the Epal student course field entity.'))
->setLabel(t('Όνομα'))
->setDescription(t('Όνομα.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
......@@ -197,19 +231,20 @@ class EpalStudentCourseField extends ContentEntityBase implements EpalStudentCou
->setDisplayConfigurable('view', TRUE);
$fields['student_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Student id'))
->setLabel(t('ID Μαθητή'))
->setDescription(t('Δώσε το id μαθητή.'))
->setSetting('target_type', 'epal_student')
->setSetting('target_type', 'epal_student')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'hidden',
'label' => 'above',
'type' => 'author',
'weight' => 0,
'weight' => -4,
))
->setDisplayOptions('form', array(
->setRequired(true)
->setDisplayOptions('form', array(
'type' => 'entity_reference_autocomplete',
'weight' => 5,
'weight' => -4,
'settings' => array(
'match_operator' => 'CONTAINS',
'size' => '60',
......@@ -217,24 +252,25 @@ class EpalStudentCourseField extends ContentEntityBase implements EpalStudentCou
'placeholder' => '',
),
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['courseField_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Specialty id'))
->setLabel(t('ID ειδικότητας'))
->setDescription(t('Δώσε το id ειδικότητας που επέλεξε ο μαθητής.'))
->setSetting('target_type', 'eepal_specialty')
->setSetting('handler', 'default')
->setRequired(true)
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'hidden',
'label' => 'above',
'type' => 'author',
'weight' => 0,
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'entity_reference_autocomplete',
'weight' => 5,
'weight' => -4,
'settings' => array(
'match_operator' => 'CONTAINS',
'size' => '60',
......
......@@ -73,5 +73,11 @@ interface EpalStudentCourseFieldInterface extends ContentEntityInterface, Entit
* The called Epal student course field entity.
*/
public function setPublished($published);
//get/set methods for additional fields for configuration properties.
public function getCourseField_id();
public function setCourseField_id($val);
public function getStudent_id();
public function setStudent_id($val);
}
......@@ -73,5 +73,19 @@ interface EpalStudentEpalChosenInterface extends ContentEntityInterface, Entity
* The called Epal student epal chosen entity.
*/
public function setPublished($published);
//get/set methods for additional fields for configuration properties.
public function getStudent_id();
public function setStudent_id($val);
public function getEpal_id();
public function setEpal_id($val);
public function getChoice_no();
public function setChoice_no($val);
public function getPoints_for_order();
public function setPoints_for_order($val);
public function getDistance_from_epal();
public function setDistance_from_epal($val);
public function getPoints_for_distance();
public function setPoints_for_distance($val);
}
......@@ -74,63 +74,36 @@ interface EpalStudentInterface extends ContentEntityInterface, EntityChangedInt
*/
public function setPublished($published);
/**
* Gets the EPAL Student surname.
*
* @return string
* Surname of the EPAL Student.
*/
public function getSurname();
/**
* Sets the EPAL Student surname.
*
* @param string $surname
* The EPAL Student surname.
*
* @return \Drupal\epal\Entity\EpalStudentInterface
* The called EPAL Student entity.
*/
public function setSurname($surname);
/**
* Gets the EPAL Student address.
*
* @return string
* Address of the EPAL Student.
*/
public function getAddress();
/**
* Sets the EPAL Student address.
*
* @param string $address
* The EPAL Student address.
*
* @return \Drupal\epal\Entity\EpalStudentInterface
* The called EPAL Student entity.
*/
public function setAddress($address);
/**
* Gets the EPAL Student birthdate.
*
* @return string
* Birthdate of the EPAL Student.
*/
public function getBirthdate();
/**
* Sets the EPAL Student birthdate.
*
* @param string $birthdate
* The EPAL Student birthdate.
*
* @return \Drupal\epal\Entity\EpalStudentInterface
* The called EPAL Student entity.
*/
public function setBirthdate($birthdate);
//get/set methods for additional fields for configuration properties.
public function getUser_id();
public function setUser_id($val);
public function getEpaluser_id();
public function setEpaluser_id($val);
public function getStudentSurname();
public function setStudentSurname($val);
//public function getGuardianFirstname();
//public function setGuardianFirstname($val);
//public function getGuardianSurname();
//public function setGuardianSurname($val);
public function getStudentAmka();
public function setStudentAmka($val);
public function getRegionAddress();
public function setRegionAddress($val);
public function getRegionTK();
public function setRegionTK($val);
public function getRegionArea();
public function setRegionArea($val);
public function getCertificateType();
public function setCertificateType($val);
public function getCurrentclass();
public function setCurrentclass($val);
public function getCurrentepal();
public function setCurrentepal($val);
public function getCurrentsector();
public function setCurrentsector($val);
public function getTelnum();
public function setTelnum($val);
public function getRelationToStudent();
public function setRelationToStudent($val);
}
......@@ -73,5 +73,38 @@ interface EpalUsersInterface extends ContentEntityInterface, EntityChangedInter
* The called Epal users entity.
*/
public function setPublished($published);
//get/set methods for additional fields for configuration properties.
public function getDrupaluser_id();
public function setDrupaluser_id($val);
public function getTaxis_userid();
public function setTaxis_userid($val);
public function getTaxis_taxid();
public function setTaxis_taxid($val);
public function getSurname();
public function setSurname($val);
public function getFathername();
public function setFathername($val);
public function getMothername();
public function setMothername($val);
//public function getAddress();
//public function setAddress($val);
//public function getAddresstk();
//public function setAddresstk($val);
//public function getAddressarea();
//public function setAddressarea($val);
public function getAccesstoken();
public function setAccesstoken($val);
public function getAuthtoken();
public function setAuthtoken($val);
public function getTimelogin();
public function setTimelogin($val);
public function getTimeregistration();
public function setTimeregistration($val);
public function getTimetokeninvalid();
public function setTimetokeninvalid($val);
public function getUserip();
public function setUserip($val);
}
......@@ -20,8 +20,10 @@ class EpalStudentCourseFieldListBuilder extends EntityListBuilder {
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this->t('Epal student course field ID');
$header['name'] = $this->t('Name');
$header['id'] = $this->t('ID');
$header['name'] = $this->t('Όνομα');
$header['student_id'] = $this->t('ID Μαθητή');
$header['courseField_id'] = $this->t('ID Ειδικότητας');
return $header + parent::buildHeader();
}
......@@ -39,6 +41,27 @@ class EpalStudentCourseFieldListBuilder extends EntityListBuilder {
)
)
);
$row['student_id'] = $this->l(
$entity->getStudent_id(),
new Url(
'entity.epal_student_course_field.edit_form', array(
'epal_student_course_field' => $entity->id(),
)
)
);
$row['courseField_id'] = $this->l(
$entity->getCourseField_id(),
new Url(
'entity.epal_student_course_field.edit_form', array(
'epal_student_course_field' => $entity->id(),
)
)
);
return $row + parent::buildRow($entity);
}
......
......@@ -20,8 +20,12 @@ class EpalStudentEpalChosenListBuilder extends EntityListBuilder {
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this->t('Epal student epal chosen ID');
$header['name'] = $this->t('Name');
$header['id'] = $this->t('ID');
$header['name'] = $this->t('Όνομα');
$header['student_id'] = $this->t('Id Μαθητή');
$header['epal_id'] = $this->t('ΕΠΑΛ');
$header['choice_no'] = $this->t('Σειρά προτίμησης');
return $header + parent::buildHeader();
}
......@@ -39,6 +43,11 @@ class EpalStudentEpalChosenListBuilder extends EntityListBuilder {
)
)
);
//$entity->get('name')->getString();
$row['student_id'] = $entity->getStudent_id();
$row['epal_id'] = $entity->getEpal_id();
$row['choice_no'] = $entity->getChoice_no();
return $row + parent::buildRow($entity);
}
......
......@@ -20,8 +20,14 @@ class EpalStudentListBuilder extends EntityListBuilder {
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this->t('EPAL Student ID');
$header['name'] = $this->t('Name');
$header['id'] = $this->t('ID');
$header['epaluser_id'] = $this->t('ID χρήστη ΕΠΑΛ');
$header['name'] = $this->t('Όνομα');
$header['studentsurname'] = $this->t('Επώνυμο');
//$header['guardianfirstname'] = $this->t('Όνομα κηδεμόνα');
//$header['guardiansurname'] = $this->t('Επώνυμο κηδεμόνα');
$header['studentamka'] = $this->t('AMKA μαθητή');
return $header + parent::buildHeader();
}
......@@ -31,14 +37,63 @@ class EpalStudentListBuilder extends EntityListBuilder {
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\epal\Entity\EpalStudent */
$row['id'] = $entity->id();
$row['epaluser_id'] = $this->l(
$entity->getEpaluser_id(),
new Url(
'entity.epal_student.edit_form', array(
'epal_student' => $entity->id(),
)
)
);
$row['name'] = $this->l(
$entity->label(),
$entity->getName(),
new Url(
'entity.epal_student.edit_form', array(
'epal_student' => $entity->id(),
)
)
);
$row['studentsurname'] = $this->l(
$entity->getStudentSurname(),
new Url(
'entity.epal_student.edit_form', array(
'epal_student' => $entity->id(),
)
)
);
/*
$row['guardianfirstname'] = $this->l(
$entity->getGuardianFirstname(),
new Url(
'entity.epal_student.edit_form', array(
'epal_student' => $entity->id(),
)
)
);
$row['guardiansurname'] = $this->l(
$entity->getGuardianSurname(),
new Url(
'entity.epal_student.edit_form', array(
'epal_student' => $entity->id(),
)
)
);
*/
$row['studentAmka'] = $this->l(
$entity->getStudentAmka(),
new Url(
'entity.epal_student.edit_form', array(
'epal_student' => $entity->id(),
)
)
);
return $row + parent::buildRow($entity);
}
......
......@@ -20,9 +20,26 @@ class EpalUsersListBuilder extends EntityListBuilder {
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this->t('Epal users ID');
$header['name'] = $this->t('Name');
return $header + parent::buildHeader();
$header['id'] = $this->t('ID');
$header['name'] = $this->t('Όνομα');
$header['surname'] = $this->t('Επώνυμο');
$header['fathername'] = $this->t('Όνομα πατέρα');
$header['mothername'] = $this->t('Όνομα μητέρας');
//$header['drupaluser_id'] = $this->t('ID χρήστη Drupal');
//$header['taxis_userid'] = $this->t('ID χρήστη από taxisnet');
//$header['taxis_taxid'] = $this->t('TAXID χρήστη από taxisnet');
//$header['address'] = $this->t('Διεύθυνση');
//$header['addresstk'] = $this->t('ΤΚ');
//$header['addressarea'] = $this->t('Περιοχή');
//$header['accesstoken'] = $this->t('AccessToken');
//$header['authtoken'] = $this->t('AuthToken');
//$header['timelogin'] = $this->t('Time Login');
//$header['timeregistration'] = $this->t('Time Registration');
//$header['timetokeninvalid'] = $this->t('Time Token Invalid');
//$header['userip'] = $this->t('User IP');
return $header + parent::buildHeader();
}
/**
......@@ -30,8 +47,8 @@ class EpalUsersListBuilder extends EntityListBuilder {
*/
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\epal\Entity\EpalUsers */
$row['id'] = $entity->id();
$row['name'] = $this->l(
$row['id'] = $entity->id();
$row['name'] = $this->l(
$entity->label(),
new Url(
'entity.epal_users.edit_form', array(
......@@ -39,6 +56,31 @@ class EpalUsersListBuilder extends EntityListBuilder {
)
)
);
$row['surname'] = $this->l(
$entity->getSurname(),
new Url(
'entity.epal_users.edit_form', array(
'epal_users' => $entity->id(),
)
)
);
$row['fathername'] = $this->l(
$entity->getFathername(),
new Url(
'entity.epal_users.edit_form', array(
'epal_users' => $entity->id(),
)
)
);
$row['mothername'] = $this->l(
$entity->getMothername(),
new Url(
'entity.epal_users.edit_form', array(
'epal_users' => $entity->id(),
)
)
);
return $row + parent::buildRow($entity);
}
......
<?php
/**
* @file
* Contains eepal_sectors.page.inc.
*
* Page callback for Eepal sectors entities.
*/
use Drupal\Core\Render\Element;
/**
* Prepares variables for Eepal sectors templates.
*
* Default template: eepal_sectors.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the user information and any
* - attributes: HTML attributes for the containing element.
*/
function template_preprocess_eepal_sectors(array &$variables) {
// Fetch EepalSectors Entity Object.
$eepal_sectors = $variables['elements']['#eepal_sectors'];
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}
......@@ -28,3 +28,8 @@ entity.eepal_specialties_in_epal.add_form:
title: 'Add Eepal specialties in epal'
appears_on:
- entity.eepal_specialties_in_epal.collection
entity.eepal_sectors.add_form:
route_name: entity.eepal_sectors.add_form
title: 'Add Eepal sectors'
appears_on:
- entity.eepal_sectors.collection
......@@ -82,3 +82,17 @@ eepal_specialties_in_epal.admin.structure.settings:
description: 'Configure Eepal specialties in epal entities'
route_name: eepal_specialties_in_epal.settings
parent: system.admin_structure
# Eepal sectors menu items definition
entity.eepal_sectors.collection:
title: 'Eepal sectors list'
route_name: entity.eepal_sectors.collection
description: 'List Eepal sectors entities'
parent: system.admin_structure
weight: 100
eepal_sectors.admin.structure.settings:
title: Eepal sectors settings
description: 'Configure Eepal sectors entities'
route_name: eepal_sectors.settings
parent: system.admin_structure
......@@ -130,3 +130,25 @@ entity.eepal_specialties_in_epal.delete_form:
title: Delete
weight: 10
# Eepal sectors routing definition
eepal_sectors.settings_tab:
route_name: eepal_sectors.settings
title: 'Settings'
base_route: eepal_sectors.settings
entity.eepal_sectors.canonical:
route_name: entity.eepal_sectors.canonical
base_route: entity.eepal_sectors.canonical
title: 'View'
entity.eepal_sectors.edit_form:
route_name: entity.eepal_sectors.edit_form
base_route: entity.eepal_sectors.canonical
title: 'Edit'
entity.eepal_sectors.delete_form:
route_name: entity.eepal_sectors.delete_form
base_route: entity.eepal_sectors.canonical
title: Delete
weight: 10
......@@ -130,3 +130,25 @@ view published eepal specialties in epal entities:
view unpublished eepal specialties in epal entities:
title: 'View unpublished Eepal specialties in epal entities'
add eepal sectors entities:
title: 'Create new Eepal sectors entities'
administer eepal sectors entities:
title: 'Administer Eepal sectors entities'
description: 'Allow to access the administration form to configure Eepal sectors entities.'
restrict access: true
delete eepal sectors entities:
title: 'Delete Eepal sectors entities'
edit eepal sectors entities:
title: 'Edit Eepal sectors entities'
access eepal sectors overview:
title: 'Access the Eepal sectors overview page'
view published eepal sectors entities:
title: 'View published Eepal sectors entities'
view unpublished eepal sectors entities:
title: 'View unpublished Eepal sectors entities'
<?php
namespace Drupal\epalreadydata;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Access\AccessResult;
/**
* Access controller for the Eepal sectors entity.
*
* @see \Drupal\epalreadydata\Entity\EepalSectors.
*/
class EepalSectorsAccessControlHandler extends EntityAccessControlHandler {
/**