Skip to content

Missing preview icon#30242

Merged
Quy merged 3 commits intojoomla:4.0-devfrom
N6REJ:preview
Aug 1, 2020
Merged

Missing preview icon#30242
Quy merged 3 commits intojoomla:4.0-devfrom
N6REJ:preview

Conversation

@N6REJ
Copy link
Copy Markdown
Contributor

@N6REJ N6REJ commented Jul 31, 2020

Pull Request for Issue # .

Summary of Changes

repaired preview icon lost in last pr

Testing Instructions

go to System > Site Templates > Cassiopeia Details and Files > Template Preview button and verify the image icon "fas fa-image" is there

Actual result BEFORE applying this Pull Request

no icon present

Expected result AFTER applying this Pull Request

image

Documentation Changes Required

none

@sandewt
Copy link
Copy Markdown
Contributor

sandewt commented Jul 31, 2020

I have tested this item ✅ successfully on 59c1ab8

Result:

<span class="fas fa-image" aria-hidden="true"></span>

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30242.

@infograf768
Copy link
Copy Markdown
Member

I have tested this item ✅ successfully on 59c1ab8


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30242.

@infograf768
Copy link
Copy Markdown
Member

Restarted drone.
Note: Looks I forgot to add that preview button for admin templates.

@sandewt
Copy link
Copy Markdown
Contributor

sandewt commented Jul 31, 2020

Restarted drone.

What do you mean?

Note: Looks I forgot to add that preview button for admin templates.

Right, it will link to the site instead of seeing a preview of the template.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30242.

@Quy Quy removed the PR-4.0-dev label Jul 31, 2020
@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jul 31, 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30242.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 31, 2020
@Quy Quy added the PR-4.0-dev label Jul 31, 2020
@infograf768
Copy link
Copy Markdown
Member

infograf768 commented Jul 31, 2020

@N6REJ
Could you please update your branch from origin to solve the drone issue?

Also, as you are at it, I suggest you add the Preview button for admin template.
The whole block of code should be

		// Add a Template preview button
		$client = (int) $this->preview->client_id === 1 ? 'administrator/' : '';

		if ($this->type === 'home')
		{
			$bar->linkButton('preview')
				->icon('fas fa-image')
				->text('COM_TEMPLATES_BUTTON_PREVIEW')
				->url(Uri::root() . $client . 'index.php?tp=1&templateStyle=' . $this->preview->id)
				->attributes(['target' => '_new']);
		}

I tested it fine. I can also do in a new PR if you prefer.

Comment thread administrator/components/com_templates/src/View/Template/HtmlView.php Outdated
@N6REJ
Copy link
Copy Markdown
Contributor Author

N6REJ commented Jul 31, 2020

@N6REJ
Could you please update your branch from origin to solve the drone issue?

Also, as you are at it, I suggest you add the Preview button for admin template.

I tested it fine. I can also do in a new PR if you prefer.

done

However the preview buttons doesn't work correctly.
It takes you back to dashboard via /administrator/index.php?tp=1&templateStyle=10
but thats for another pr

@infograf768
Copy link
Copy Markdown
Member

However the preview buttons doesn't work correctly.
It takes you back to dashboard via /administrator/index.php?tp=1&templateStyle=10

It does not take you back but opens a new window with modules positions.
That is perfectly fine imho.

Relaunched drone again.

@Quy Quy merged commit a09aadb into joomla:4.0-dev Aug 1, 2020
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 1, 2020
@Quy Quy added this to the Joomla 4.0 milestone Aug 1, 2020
@N6REJ N6REJ deleted the preview branch August 2, 2020 18:18
sakiss pushed a commit to sakiss/joomla-cms that referenced this pull request Oct 16, 2020
* replace lost preview icon

* add admin preview support

* moved $client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants