css and removing the "left" and "right" classes from templates

This commit is contained in:
naomi 2021-12-05 19:16:39 +00:00
parent 3b62ebd0ee
commit ba4e6668aa
6 changed files with 19 additions and 63 deletions

View File

@ -32,16 +32,14 @@ body {
font-size: 100% !important;
}
.field--type-entity-reference-revisions .field__items {
margin-left: 2em;
.field.field--type-entity-reference {
margin: inherit;
}
.field--type-entity-reference-revisions .field__items .field{
margin-top: 0;
}
.field--type-entity-reference-revisions .field__items .paragraph{
margin-top: 0.5em;
margin-bottom: 0.5em;
.field {
width: 30%;
display: inline-block;
padding: 0.4em;
}
/* remove this confusing thing from user creation page */

View File

@ -275,18 +275,12 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
$fields['created'] = BaseFieldDefinition::create('created')
->setLabel(t('Created on'))
->setDescription(t('When the case was created.'))
->setDisplayOptions('view', [
'label' => 'above',
'weight' => 80,
]);
->setDisplayConfigurable('view', true);
$fields['changed'] = BaseFieldDefinition::create('changed')
->setLabel(t('Last updated'))
->setDescription(t('When the case was last edited.'))
->setDisplayOptions('view', [
'label' => 'above',
'weight' => 80,
]);
->setDisplayConfigurable('view', true);
$fields['revision_translation_affected'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Revision translation affected'))

View File

@ -16,18 +16,7 @@
*/
#}
<div{{ attributes.addClass('oc_case') }}>
<h2>{{ title }}</h2>
<div class="oc_entity">
<div class="left">
{{ base_fields.actors_involved }}
{{ base_fields.changed }}
{{ base_fields.created }}
{{ base_fields.user_id }}
</div>
<div class="right">
{% for field in other_fields %}
{{ field }}
{% endfor %}
</div>
</div>
{% if content %}
{{- content -}}
{% endif %}
</div>

View File

@ -246,10 +246,10 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
->setSetting('target_type', 'user')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayConfigurable('view', true)
->setDisplayOptions('view', [
'label' => 'inline',
'label' => 'above',
'type' => 'author',
'weight' => -4,
]);
$fields['name'] = BaseFieldDefinition::create('string')

View File

@ -16,19 +16,7 @@
*/
#}
<div{{ attributes.addClass('oc_activity') }}>
<h2>{{ title }}</h2>
<div class="oc_entity">
<div class="left">
{{ base_fields.actors_involved }}
{{ base_fields.activity_date_time }}
{{ base_fields.description }}
{{ base_fields.time_taken }}
{{ base_fields.user_id }}
</div>
<div class="right">
{% for field in other_fields %}
{{ field }}
{% endfor %}
</div>
</div>
{% if content %}
{{- content -}}
{% endif %}
</div>

View File

@ -16,20 +16,7 @@
*/
#}
<div{{ attributes.addClass('oc_actor') }}>
<div class="oc_entity">
<div class="left">
{% for field in fields_other_than_contact_details %}
{{ field }}
{% endfor %}
</div>
<div class="right">
<div id ="contact_details">
<h2>Contact Details</h2>
<a class="field" href="/opencase/oc_actor/{{ id }}/contact_details_history">See history</a>
{% for field in contact_details %}
{{ field }}
{% endfor %}
</div>
</div>
</div>
{% if content %}
{{- content -}}
{% endif %}
</div>