core icon indicating copy to clipboard operation
core copied to clipboard

Add layout.public page

Open requist opened this issue 12 years ago • 14 comments

For #9760 I implemented the sticky footer the same way it was implemented in layout.user.php For this I moved the footer to layout.base.php because it needed to be in the wrapper. Later I realized the name layout.BASE.php probably had a purpose :-)

While thinking about a solution for this, I thought it might be nice to have a template with header and footer for public access anyway, this reduces the code in the public.php from the apps and certifies a common look. I mentioned this to @jancborchardt and he asked to open an issue on this matter so here it is :)

@Pvince81 @deepdiver1975 @karlitschek

requist avatar Jul 23 '14 12:07 requist

Yes, I also think we need this, at least for the header. Currently Files, Pictures and Documents all implement their own public page.

jancborchardt avatar Jul 23 '14 14:07 jancborchardt

@jancborchardt Looks like documents uses layout.guest not layout.base. I tested with Pictures and it's easily transfered to the other layout (delete some lines). Don't know if many external apps use public pages. It's a addition so the layout.base still works but for new pages and maintenance it would be easier.

requist avatar Jul 23 '14 15:07 requist

@requist it would be cool if you could also directly submit according pull requests to Documents and Pictures. Those are the 2 other apps (next to files/sharing) which expose a public page.

@PVince81 @DeepDiver1975 @owncloud/designers what do you think of this approach? A default public template is important I think as said above.

jancborchardt avatar Jul 23 '14 16:07 jancborchardt

@jancborchardt The PR for pictures I have already locally in the queue. Just waiting for this one to be approved before I finalize that one. Documents uses layout.guest, it's a bit different but I'll have a look if it can run instead with layout.public. Then we would have only one public layout and all deviations in the apps itself.

requist avatar Jul 23 '14 17:07 requist

@jancborchardt I looked a bit more at this, but since login and error pages still use layout.guest.php we still will have a lot of code and styles running as direct copies, so not very good for maintenance. Also in naming the difference between guest and public it is not really clear. Maybe it is better to make some more $renderas and have the design choices as body, headers and footers in templatelayout.php, parsing them on to common layout pages. ATM we have $renderas:

  • user > for normal logged in users, using layout.user.php
  • guest > for login, install, error and documents, using layout.guest.php
  • base > for the rest, using layout.base.php

I propose to make some other $renderas:

  • user > for normal logged in users, side-menu, header, no footer, using using layout.user.php
  • portal > for login, install and error pages, big header and sticky footer, using layout.guest.php
  • guest > for documents, gallery, files_shares and other non-logged-in apps, both header and footer, no side-menu, using layout.guest.php
  • base > no menus, headers or footers, using layout.guest.php we could also make several user and guest renders to make requests with or without footer or side-menu.

portal, guest and base can all be made from layout.guest with some options for body, headers and footers being parsed by templatelayout.php. The apps tell what $renderas and only push content and optional specific headers. I have this locally largely implemented to check what issues would came up, if this setup sounds right, I can prepare the PR's for Core, Documents and Gallery.

One issue still remains. Because the headers are made from the layout pages except for the parts specific for the apps (header-right), the resulting page has a double header. This could be solved by preparing the header elsewhere and have it all inserted by layout.guest.php. A unused mechanism is already implemented for this, maybe with a different PR this could be changed and or activated.

requist avatar Jul 29 '14 09:07 requist

@jancborchardt Like discussed, small steps at the time so people can shoot at or kill with little effort spend. One of the reasons to join is to learn, so please do not hold back on feedback.

First step actually does nothing, except making way for different style-sheets and getting rid of the massive logo when using a different body-style. PR #10109

requist avatar Aug 01 '14 16:08 requist

We are looking forward to have a possibility to use our own header and footer of the corporate design, so :+1: As @jancborchardt said a pull request would be nice. Currently the documents app is causing some problems using custom header and footer defined in layout.guest.php.

alekiy avatar Jan 26 '15 16:01 alekiy

@oparoz @VicDeo @schiesbn @requist maybe you want to get together on this as the relevant people? (of Gallery, Documents, Sharing, and this request)

jancborchardt avatar Sep 15 '15 23:09 jancborchardt

Gallery uses the public template (like sharing) and has a sticky footer, which is themed via the main themeing mechanism. I need to test further, but I think the header also comes from the theme. I need to check the standard template, but we wouldn't want a footer there.

oparoz avatar Sep 15 '15 23:09 oparoz

So it’s only Documents which uses a custom mechanism here?

jancborchardt avatar Sep 15 '15 23:09 jancborchardt

@jancborchardt Documents needs footer only for password-protected links (to enter a password) and 404 (if the link to document is incorrect) There is a little sense to have a footer inside the editor

VicDeo avatar Sep 16 '15 15:09 VicDeo

Well, the template could account for that and make footer optional. Shared calendars for example also don’t need a footer.

jancborchardt avatar Sep 16 '15 15:09 jancborchardt

The PR was merged, what's the next step ?

We're past feature freeze, moving to 9.1

PVince81 avatar Feb 12 '16 10:02 PVince81

Anyone interested in continuing this ?

Moving to backlog for now.

PVince81 avatar Jan 27 '17 14:01 PVince81