This commit is contained in:
naomi 2018-04-15 12:44:07 +02:00
parent feaaa6cbb8
commit fae90205a4
6 changed files with 62 additions and 15 deletions

View File

@ -12,10 +12,19 @@ div.region.region-primary-menu {
border-bottom: none;
}
.region-sidebar-second .view-content li, .region-sidebar-second .views-row {
border-bottom: 1px solid lightgrey;
.region-sidebar-second .view-content li, .region-sidebar-second .views-row, .region-sidebar-second .zencrm_inner_sidebar_block {
border-bottom: 10px solid #e6e6d3;
padding-bottom: 20px;
padding-top: 20px;
padding-top: 10px;
padding-right: 10px;
padding-left: 10px;
background: #eeeedb;
border: 1px solid lightgrey;
margin-bottom: 10px;
}
.region-sidebar-second .view-content li .zencrm_editlink , .region-sidebar-second .views-row .zencrm_editlink, .region-sidebar-second .zencrm_inner_sidebar_block .zencrm_editlink{
margin-top: -20px;
}
.sidebar .region-sidebar-second h2 {
@ -24,14 +33,19 @@ div.region.region-primary-menu {
border-bottom: 1px solid grey;
}
.sidebar .views-field.views-field-type, .field--name-type{
.sidebar .views-field.views-field-type, .field--name-type, .zencrm_inner_sidebar_block .zencrm_title {
padding-bottom: 12px;
font-size: 1.4em;
text-align: center;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.sidebar .field__label, .sidebar .field--type-entity-reference .field__label {
.zencrm_inner_sidebar_block .zencrm_title {
font-size: 1.2em;
padding-bottom: 5px;
}
.sidebar .field__label, .sidebar .field--type-entity-reference .field__label, .form-item label {
font-size: 1em;
font-weight: bold;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@ -46,7 +60,6 @@ div.region.region-primary-menu {
}
.region-sidebar-second .view-content li, .region-sidebar-second .views-row {
border-bottom: 10px solid #e6e6d3;
padding-bottom: 20px;
padding-top: 10px;
padding-right: 10px;
@ -61,4 +74,35 @@ div.region.region-primary-menu {
.zencrm_creationlinks {
padding: 10px 10px 10px 20px;
font-size: 1.2em;
}
.sidebar .zencrm_links {
font-size: 1.2em;
}
.sidebar .zencrm_links p, .sidebar .zencrm_creationlinks p {
margin-bottom: 0.5em;
}
.zencrm_creationlinks p {
margin-bottom: 0.5em;
}
.sidebar .zencrm_creationlinks {
padding: 5px;
font-size: 1.3em;
}
.sidebar .zencrm_editlink {
font-size: 1.2em;
text-align: right;
}
#block-hatcreator {
padding: 0;
border: none;
margin: 0;
}

View File

@ -225,7 +225,7 @@ class CaseEntity extends ContentEntityBase implements CaseEntityInterface {
->setLabel(t('Created'))
->setDescription(t('The time that the entity was created.'))
->setDisplayOptions('view', [
'label' => 'inline',
'label' => 'above',
'type' => 'string',
'weight' => 0,
]);

View File

@ -17,6 +17,6 @@
#}
<div{{ attributes.addClass('case_entity') }}>
{% if content %}
{{- content -}}
<div id = '#zencrm_case'>{{- content -}}</div>
{% endif %}
</div>

View File

@ -32,7 +32,7 @@ class ActivityCreator extends BlockBase {
'#cache' => [
'max-age' => 0,
],
'#markup' => "<div class='zencrm_creation_links'>$markup</div>"
'#markup' => "<div class='zencrm_creationlinks'>$markup</div>"
];
}

View File

@ -35,23 +35,26 @@ class CaseDetails extends BlockBase {
}
private function renderEditLink($case_id) {
return "<p class = 'zencrm_edit_link'><a class='use-ajax' data-dialog-type='modal' href='/zencrm/case/$case_id/edit?destination=/zencrm/case/$case_id'>Edit</a></p>";
return "<p class = 'zencrm_editlink'><a class='use-ajax' data-dialog-type='modal' href='/zencrm/case/$case_id/edit?destination=/zencrm/case/$case_id'>Edit</a></p>";
}
private function renderEntity($case) {
$view_builder = \Drupal::entityTypeManager()->getViewBuilder('case_entity');
$build = $view_builder->view($case, 'default');
return render($build);
$markup = render($build);
return "<div class='zencrm_inner_sidebar_block'>$markup</div>";
}
private function renderInvolvedParties($case) {
$markup = "<h3>Involved Parties</h3>";
$markup = "<p class='zencrm_title'>Involved Parties</p>";
$hats_involved = $case->hats_involved->referencedEntities();
$links_markup = "";
foreach($hats_involved as $hat) {
$person_id = $hat->person->first()->getValue()['target_id'];
$markup .= "<p><a href='/zencrm/person/$person_id'>" . $hat->name->getString() . "</a></p>";
$links_markup .= "<p><a href='/zencrm/person/$person_id'>" . $hat->name->getString() . "</a></p>";
}
return "<div class='zencrm_links'>$markup</div>";
$markup .= "<div class='zencrm_links'>$links_markup</div>";
return "<div class='zencrm_inner_sidebar_block'>$markup</div>";
}
}

View File

@ -38,7 +38,7 @@ class HatCreator extends BlockBase {
'#cache' => [
'max-age' => 0,
],
'#markup' => "<div class='zencrm_creation_links'>$markup</div>"
'#markup' => "<div class='zencrm_creationlinks'>$markup</div>"
];
}