Compare commits

...

6 Commits

  1. 40
      templates/block/block--advanced-search.html.twig
  2. 40
      templates/layout/page--user.html.twig
  3. 72
      templates/layout/page--user.html.twig.bk
  4. 11
      templates/main_layouts/taxonomy-term--scholars.html.twig
  5. 24
      templates/views/views-view-fields--solr-search-content--page-1.html.twig

40
templates/block/block--advanced-search.html.twig

@ -0,0 +1,40 @@
{#
/**
* @file
* Theme override to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*/
#}
<div{{ attributes.addClass('block') }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes.addClass('block-title') }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
<div class="block-content">
{% block content %}
{{ content }}
{% endblock %}
<a href="/search">ADVANCED SEARCH</a>
</div><!--/.block-content -->
</div><!--/.block -->

40
templates/layout/page--user.html.twig

@ -9,7 +9,10 @@
{% include '@vre2024/template-parts/highlighted.html.twig' %} {% include '@vre2024/template-parts/highlighted.html.twig' %}
{% endif %} {% endif %}
{% set scholar_tid = 7737 %}
{# {{ dump(_context) }} #}
{% set scholar_name = page['#title'] %}
<div class="main-wrapper"> <div class="main-wrapper">
<div class="container"> <div class="container">
<a id="main-content" tabindex="-1"></a> <a id="main-content" tabindex="-1"></a>
@ -23,37 +26,32 @@
<h2>Manage Your Scholar Profile</h2> <h2>Manage Your Scholar Profile</h2>
<div id="tabs" class="profile_management"> <div id="tabs" class="profile_management">
<ul> <ul>
<li><a href="#preview"><i class="far fa-eye"></i>Preview</a></li> <li><a href="#tab_1"><i class="far fa-eye"></i>Preview</a></li>
<li><a href="#publications"><i class="fas fa-list"></i>Your Publications</a></li> <li><a href="#tab_2"><i class="fas fa-list"></i>Your Publications</a></li>
<li><a href="#tabs-1"><i class="fas fa-edit"></i>Add Scholarly Works</a></li> <li><a href="#tab_3"><i class="fas fa-edit"></i>Edit Your Profile</a></li>
<li><a href="#tabs-2"><i class="fas fa-plus"></i>Deposit Full Text</a></li> <li><a href="#tab_4"><i class="fas fa-plus"></i>Add Scholarly Works</a></li>
<li><a href="#tabs-3"><i class="fas fa-plus"></i>Edit Your Profile</a></li> <li><a href="#tab_5"><i class="fas fa-plus"></i>Deposit Full Text</a></li>
</ul> </ul>
<div id="preview">
Need to put the existing profile here, I need access to a variable (ID?) that I can use to grab the correct profile page for insertion
{{ drupal_entity('taxonomy_term', scholar_tid) }}
<div id="tab_1">
{{ drupal_view('profile_preview_block', 'block_1', scholar_name) }}
</div> </div>
<div id="publications"> <div id="tab_2">
<h3>Your Publications:</h3>
{{ drupal_view('my_publications', 'block_1') }} {{ drupal_view('my_publications', 'block_1') }}
</div> </div>
<div id="tabs-1"> <div id="tab_3">
<h3>Request Changes to Your Profile:</h3>
{{ drupal_entity('webform', 'edit_scholar_profile') }}
</div>
<div id="tab_4">
<h3>Add Scholarly Works To Your Profile:</h3> <h3>Add Scholarly Works To Your Profile:</h3>
{{ drupal_entity('webform', 'add_scholarly_works') }} {{ drupal_entity('webform', 'add_scholarly_works') }}
</div> </div>
<div id="tabs-2"> <div id="tab_5">
<h3>Deposit Full Text:</h3> <h3>Deposit Full Text:</h3>
{{ drupal_entity('webform', 'deposit_full_text') }} {{ drupal_entity('webform', 'deposit_full_text') }}
</div> </div>
<div id="tabs-3">
<h3>Request Changes to Your Profile:</h3>
{{ drupal_entity('webform', 'edit_scholar_profile') }}
</div>
</div> </div>
{{ page.content }} {{ page.content }}
</div> </div>

72
templates/layout/page--user.html.twig.bk

@ -0,0 +1,72 @@
{% if page.header_top_left or page.header_top_right %}
{% include '@vre2024/template-parts/header/header-top.html.twig' %}
{% endif %}
{% include '@vre2024/template-parts/header/header.html.twig' %}
{% if not is_front and page.page_header %}
{% include '@vre2024/template-parts/header/header-page.html.twig' %}
{% endif %}
{% if page.highlighted %}
{% include '@vre2024/template-parts/highlighted.html.twig' %}
{% endif %}
{# {{ dump(_context) }} #}
{% set scholar_name = page['#title'] %}
<div class="main-wrapper">
<div class="container">
<a id="main-content" tabindex="-1"></a>
<div class="main-container">
<main id="main" class="main-content">
{% if page.content_top %}
{% include '@vre2024/template-parts/content-parts/content_top.html.twig' %}
{% endif %}
<h2>Manage Your Scholar Profile</h2>
<div id="tabs" class="profile_management">
<ul>
<li><a href="#tab_1"><i class="far fa-eye"></i>Preview</a></li>
<li><a href="#tab_2"><i class="fas fa-list"></i>Your Publications</a></li>
<li><a href="#tab_3"><i class="fas fa-edit"></i>Edit Your Profile</a></li>
<li><a href="#tab_4"><i class="fas fa-plus"></i>Add Scholarly Works</a></li>
<li><a href="#tab_5"><i class="fas fa-plus"></i>Deposit Full Text</a></li>
</ul>
<div id="tab_1">
{{ drupal_view('profile_preview_block', 'block_1', scholar_name) }}
</div>
<div id="tab_2">
<h3>Your Publications:</h3>
{{ drupal_view('my_publications', 'block_1') }}
</div>
<div id="tab_3">
<h3>Request Changes to Your Profile:</h3>
{{ drupal_entity('webform', 'edit_scholar_profile') }}
</div>
<div id="tab_4">
<h3>Add Scholarly Works To Your Profile:</h3>
{{ drupal_entity('webform', 'add_scholarly_works') }}
</div>
<div id="tab_5">
<h3>Deposit Full Text:</h3>
{{ drupal_entity('webform', 'deposit_full_text') }}
</div>
</div>
{{ page.content }}
</div>
{% if page.content_bottom %}
{% include '@vre2024/template-parts/content-parts/content_bottom.html.twig' %}
{% endif %}
</main>
{% if page.sidebar_first %}
{% include '@vre2024/template-parts/sidebar/sidebar_left.html.twig' %}
{% endif %}
{% if page.sidebar_second %}
{% include '@vre2024/template-parts/sidebar/sidebar_right.html.twig' %}
{% endif %}
</div><!--/main-container -->
</div><!--/container -->
</div><!--/main-wrapper -->
{% include '@vre2024/template-parts/footer/footer.html.twig' %}

11
templates/main_layouts/taxonomy-term--scholars.html.twig

@ -23,12 +23,12 @@
* @see template_preprocess_taxonomy_term() * @see template_preprocess_taxonomy_term()
*/ */
#} #}
{# my dubugger #} {# my dubugger
<details> <details>
<summary>Rob's var dump</summary> <summary>Rob's var dump</summary>
{{ dump(content) }} {{ dump(content) }}
</details> </details>
{# /my dubugger #} /my dubugger #}
{% {%
set fancy_fields = [ set fancy_fields = [
content.name, content.name,
@ -74,9 +74,12 @@
<hr> <hr>
{{ content.field_biography }} {{ content.field_biography }}
<hr> <hr>
<div class="field__label">Recent Citations</div> {% set view = drupal_view_result('scholar_profile_recent_citations_block', 'block_1')|length %}
{% if view > 0 %}
<div class="field__label">Recent Citations</div>
{{ drupal_view('scholar_profile_recent_citations_block', 'block_1') }} {{ drupal_view('scholar_profile_recent_citations_block', 'block_1') }}
<hr> <hr>
{% endif %}
{{ content.field_fields_of_activity }} {{ content.field_fields_of_activity }}
<hr> <hr>
</div> </div>

24
templates/views/views-view-fields--solr-search-content--page-1.html.twig

@ -29,11 +29,29 @@
* @see template_preprocess_views_view_fields() * @see template_preprocess_views_view_fields()
*/ */
#} #}
{# my dubugger
<details>
<summary>Rob's var dump</summary>
{{ dump(fields) }}
{{ dd(_context) }}
</details>
/my dubugger #}
<div class="search-result-block columns"> <div class="search-result-block columns">
<div class="left icon w20"> <div class="left icon w20">
<div class="icon-wrapper"> {% if fields.did_image.content|render %}
<i class="fas fa-file-alt"></i> {{ fields.did_image.content }}
</div> {% elseif fields.field_image.content|render %}
{{ fields.field_image.content }}
{% else %}
<div class="icon-wrapper">
<i class="fas fa-file-alt"></i>
</div>
{% endif %}
</div> </div>
<div class="right fields w80"> <div class="right fields w80">
{% for field in fields -%} {% for field in fields -%}

Loading…
Cancel
Save