Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SEO tab #1

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
283 changes: 158 additions & 125 deletions administrator/components/com_content/tmpl/article/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,129 +58,162 @@
$tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : '';
?>
<form action="<?php echo Route::_('index.php?option=com_content&layout=' . $layout . $tmpl . '&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" aria-label="<?php echo Text::_('COM_CONTENT_FORM_TITLE_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>

<div class="main-card">
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'general', 'recall' => true, 'breakpoint' => 768]); ?>

<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
<div class="row">
<div class="col-lg-9">
<div>
<fieldset class="adminform">
<?php echo $this->form->getLabel('articletext'); ?>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
</div>
</div>
<div class="col-lg-3">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>

<?php echo HTMLHelper::_('uitab.endTab'); ?>

<?php // Do not show the images and links options if the edit form is configured not to. ?>
<?php if ($params->get('show_urls_images_backend') == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'images', Text::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES')); ?>
<div class="row">
<div class="col-12 col-lg-6">
<?php foreach ($fieldsetsInImages as $fieldset) : ?>
<fieldset id="fieldset-<?php echo $fieldset; ?>" class="options-form">
<legend><?php echo Text::_($this->form->getFieldsets()[$fieldset]->label); ?></legend>
<div>
<?php echo $this->form->renderFieldset($fieldset); ?>
</div>
</fieldset>
<?php endforeach; ?>
</div>
<div class="col-12 col-lg-6">
<?php foreach ($fieldsetsInLinks as $fieldset) : ?>
<fieldset id="fieldset-<?php echo $fieldset; ?>" class="options-form">
<legend><?php echo Text::_($this->form->getFieldsets()[$fieldset]->label); ?></legend>
<div>
<?php echo $this->form->renderFieldset($fieldset); ?>
</div>
</fieldset>
<?php endforeach; ?>
</div>
</div>

<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>

<?php // Do not show the publishing options if the edit form is configured not to. ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('COM_CONTENT_FIELDSET_PUBLISHING')); ?>
<div class="row">
<div class="col-12 col-lg-6">
<fieldset id="fieldset-publishingdata" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-metadata" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php if (!$isModal && $assoc && $params->get('show_associations_edit', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'associations', Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
<fieldset id="fieldset-associations" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php elseif ($isModal && $assoc) : ?>
<div class="hidden"><?php echo LayoutHelper::render('joomla.edit.associations', $this); ?></div>
<?php endif; ?>

<?php if ($this->canDo->get('core.admin') && $params->get('show_configure_edit_options', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editor', Text::_('COM_CONTENT_SLIDER_EDITOR_CONFIG')); ?>
<fieldset id="fieldset-editor" class="options-form">
<legend><?php echo Text::_('COM_CONTENT_SLIDER_EDITOR_CONFIG'); ?></legend>
<div class="form-grid">
<?php echo $this->form->renderFieldset('editorConfig'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php if ($this->canDo->get('core.admin') && $params->get('show_permissions', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('COM_CONTENT_FIELDSET_RULES')); ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_CONTENT_FIELDSET_RULES'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php echo HTMLHelper::_('uitab.endTabSet'); ?>

<?php // Creating 'id' hiddenField to cope with com_associations sidebyside loop ?>
<?php if ($params->get('show_publishing_options', 1) == 0) : ?>
<?php $hidden_fields = $this->form->getInput('id'); ?>
<div class="hidden"><?php echo $hidden_fields; ?></div>
<?php endif; ?>

<input type="hidden" name="task" value="">
<input type="hidden" name="return" value="<?php echo $input->getBase64('return'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>

<div class="main-card">
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'general', 'recall' => true, 'breakpoint' => 768]); ?>

<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
<div class="row">
<div class="col-lg-9">
<div>
<fieldset class="adminform">
<?php echo $this->form->getLabel('articletext'); ?>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
</div>
</div>
<div class="col-lg-3">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>

<?php echo HTMLHelper::_('uitab.endTab'); ?>

<?php // Do not show the images and links options if the edit form is configured not to. ?>
<?php if ($params->get('show_urls_images_backend') == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'images', Text::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES')); ?>
<div class="row">
<div class="col-12 col-lg-6">
<?php foreach ($fieldsetsInImages as $fieldset) : ?>
<fieldset id="fieldset-<?php echo $fieldset; ?>" class="options-form">
<legend><?php echo Text::_($this->form->getFieldsets()[$fieldset]->label); ?></legend>
<div>
<?php echo $this->form->renderFieldset($fieldset); ?>
</div>
</fieldset>
<?php endforeach; ?>
</div>
<div class="col-12 col-lg-6">
<?php foreach ($fieldsetsInLinks as $fieldset) : ?>
<fieldset id="fieldset-<?php echo $fieldset; ?>" class="options-form">
<legend><?php echo Text::_($this->form->getFieldsets()[$fieldset]->label); ?></legend>
<div>
<?php echo $this->form->renderFieldset($fieldset); ?>
</div>
</fieldset>
<?php endforeach; ?>
</div>
</div>

<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>

<?php // Do not show the publishing options if the edit form is configured not to. ?>
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('COM_CONTENT_FIELDSET_PUBLISHING')); ?>
<div class="row">
<div class="col-12 col-lg-6">
<fieldset id="fieldset-publishingdata" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-metadata" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php if (!$isModal && $assoc && $params->get('show_associations_edit', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'associations', Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
<fieldset id="fieldset-associations" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php elseif ($isModal && $assoc) : ?>
<div class="hidden"><?php echo LayoutHelper::render('joomla.edit.associations', $this); ?></div>
<?php endif; ?>

<?php if ($this->canDo->get('core.admin') && $params->get('show_configure_edit_options', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editor', Text::_('COM_CONTENT_SLIDER_EDITOR_CONFIG')); ?>
<fieldset id="fieldset-editor" class="options-form">
<legend><?php echo Text::_('COM_CONTENT_SLIDER_EDITOR_CONFIG'); ?></legend>
<div class="form-grid">
<?php echo $this->form->renderFieldset('editorConfig'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php if ($this->canDo->get('core.admin') && $params->get('show_permissions', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('COM_CONTENT_FIELDSET_RULES')); ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_CONTENT_FIELDSET_RULES'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'seo', Text::_('COM_CONTENT_FIELDSET_SEO')); ?>
<div class="row">
<div class="col-12 col-lg-6">
<fieldset id="fieldset-articlepreview" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_ARTICLE_PREVIEW'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.articlepreview', $this); ?>
</div>
</fieldset>
<fieldset id="fieldset-paragraphstructure" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PARAGRAPH_STRUCTURE'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.paragraphstructure', $this); ?>
</div>
</fieldset>
</div>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-pageperformance" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PAGE_PERFORMANCE'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.pageperformance', $this); ?>
</div>
</fieldset>
<fieldset id="fieldset-linkchecker" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_LINK_CHECKER'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.linkchecker', $this); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>

<?php echo HTMLHelper::_('uitab.endTabSet'); ?>

<?php // Creating 'id' hiddenField to cope with com_associations sidebyside loop ?>
<?php if ($params->get('show_publishing_options', 1) == 0) : ?>
<?php $hidden_fields = $this->form->getInput('id'); ?>
<div class="hidden"><?php echo $hidden_fields; ?></div>
<?php endif; ?>

<input type="hidden" name="task" value="">
<input type="hidden" name="return" value="<?php echo $input->getBase64('return'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</form>
1 change: 1 addition & 0 deletions administrator/language/en-GB/com_content.ini
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ COM_CONTENT_FIELDS_ARTICLE_FIELDS_TITLE="Articles: Fields"
COM_CONTENT_FIELDS_TYPE_MODAL_ARTICLE="Article"
COM_CONTENT_FIELDSET_PUBLISHING="Publishing"
COM_CONTENT_FIELDSET_RULES="Permissions"
COM_CONTENT_FIELDSET_SEO="SEO"
COM_CONTENT_FIELDSET_URLS_AND_IMAGES="Images and Links"
COM_CONTENT_FILTER_AUTHORS_BY_ME="Created by me"
COM_CONTENT_FILTER_FEATURED_NO="Unfeatured Articles"
Expand Down
4 changes: 4 additions & 0 deletions administrator/language/en-GB/joomla.ini
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ JGLOBAL_FIELD_VERSION_NOTE_LABEL="Version Note"
JGLOBAL_FIELDS="Fields"
JGLOBAL_FIELDS_TITLE="Custom Fields"
JGLOBAL_FIELDSET_ADVANCED="Advanced"
JGLOBAL_FIELDSET_ARTICLE_PREVIEW="Article Preview"
JGLOBAL_FIELDSET_ASSOCIATIONS="Associations"
JGLOBAL_FIELDSET_BASIC="Options"
JGLOBAL_FIELDSET_CONTENT="Content"
Expand All @@ -459,8 +460,11 @@ JGLOBAL_FIELDSET_DISPLAY_OPTIONS="Display"
JGLOBAL_FIELDSET_GLOBAL="Main Options"
JGLOBAL_FIELDSET_IMAGE_OPTIONS="Images"
JGLOBAL_FIELDSET_INTEGRATION="Integration"
JGLOBAL_FIELDSET_LINK_CHECKER="Outgoing Dofollow / Nofollow Link Checker"
JGLOBAL_FIELDSET_METADATA_OPTIONS="Metadata"
JGLOBAL_FIELDSET_OPTIONS="Options"
JGLOBAL_FIELDSET_PAGE_PERFORMANCE="Page Performance"
JGLOBAL_FIELDSET_PARAGRAPH_STRUCTURE="Paragraph structure"
JGLOBAL_FIELDSET_PUBLISHING="Publishing"
JGLOBAL_FILTER_ATTRIBUTES_DESC="3. List additional attributes, separating each attribute name with a space or comma. For example: <em>class,title,id</em>."
JGLOBAL_FILTER_ATTRIBUTES_LABEL="Filter Attributes<sup>3</sup>"
Expand Down
Binary file added images/sample1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sample3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.