The news system allow to create rich HTML content on OPAC main page. This enh proposes a new page that shows one of these new. It allows to create custom pages a little bit like : http://wiki.koha-community.org/wiki/Koha_as_a_CMS
Created attachment 43263 [details] [review] Bug 14980 - Add a page showing one news The news system allow to create rich HTML content on OPAC main page. This enh proposes a new page that shows one of these new. Test plan : - Go to Tools > News - Create a new entry - Enter a title and a few content - Save - You see the new entry in table - Note its number, for example 3 - Go to opac and enter URL : /cgi-bin/koha/opac-page.pl?id=3
This patch is a POC, open to changes
Fridolin, I like the feature very much! Thinking about enhancements (not necessarily for this bug, it is rather a wishlist): - I would like to see the page id in the staff client (Home > Tools > News). The current column 'Number' could be renamed to 'Sort'. - Flag news to display only as CMS page - Flag news for "Display for logged in users only". Oh, and then, additionally flag news for certain user categories only - Make it possible to include other news in a news. Let's say you have a 'news' with opening hours and an other one with the staff mebers. It would be nice to make them re-usable as page content inside other news. Marc PS: (One small thing in opac/opac-page.pl,line 2 says "This script lets the users change their privacy rules")
Created attachment 43340 [details] [review] Bug 14980 - Add a page showing one news The news system allow to create rich HTML content on OPAC main page. This enh proposes a new page that shows one of these new. Test plan : - Go to Tools > News - Create a new entry - Enter a title and a few content - Save - You see the new entry in table - Note its number, for example 3 - Go to opac and enter URL : /cgi-bin/koha/opac-page.pl?id=3 Works as advertised. Signed-off-by: Marc Véron <veron@veron.ch>
(In reply to Marc Véron from comment #3) > - I would like to see the page id.... I mean the news id that is used to create the link.
(In reply to Marc Véron from comment #5) > (In reply to Marc Véron from comment #3) > > > - I would like to see the page id.... > I mean the news id that is used to create the link. Indeed, I was thinking to even show the OPAC full url. So one can copy/paste into OPACNav for example.
(In reply to Marc Véron from comment #3) > > PS: > (One small thing in opac/opac-page.pl,line 2 says "This script lets the > users change their privacy rules") Oups, copy/paste error, I change it
Created attachment 43397 [details] [review] Bug 14980 - Add a page showing one news The news system allow to create rich HTML content on OPAC main page. This enh proposes a new page that shows one of these new. Test plan : - Go to Tools > News - Create a new entry - Enter a title and a few content - Save - You see the new entry in table - Note its number, for example 3 - Go to opac and enter URL : /cgi-bin/koha/opac-page.pl?id=3
@Marc Please re-signoff
(In reply to Marc Véron from comment #3) > > - Flag news to display only as CMS page > I think this is the first feat to develop.
Created attachment 43404 [details] [review] Bug 14980 - Add a page showing one news The news system allow to create rich HTML content on OPAC main page. This enh proposes a new page that shows one of these new. Test plan : - Go to Tools > News - Create a new entry - Enter a title and a few content - Save - You see the new entry in table - Note its number, for example 3 - Go to opac and enter URL : /cgi-bin/koha/opac-page.pl?id=3 Signed-off-by: Marc Véron <veron@veron.ch>
> - Note its number, for example 3 This may not be clear : its the primary key, the id of the news.
My two cents on what needs to go in before this can be integrated in master: - easy access to the url of the page (as Fridolin suggested, a linkn column where you can copy the link with the news id would be perfect) - ability to flag such pages as "CMS only", I would say this kind of page is definitely not going to appear in the news flow, but maybe some people will want to use it this way. - make sure multiple languages are properly managed. This is trickier. If I build my menu in opacnav for instance, i will not be able to build a different menu, with different page ids, for different languages. So choosing OPAC (fr-FR) as the display location is not quite enough, because equivalent pages in each language will end up with different ids.
(In reply to Gaetan Boisson from comment #13) (...) > - make sure multiple languages are properly managed. This is trickier. If I > build my menu in opacnav for instance, i will not be able to build a > different menu, with different page ids, for different languages. So > choosing OPAC (fr-FR) as the display location is not quite enough, because > equivalent pages in each language will end up with different ids. Gaetan, I think the translation handling could be based on or similar to Bug 14100 - Generic solution for language overlay
Comment on attachment 43404 [details] [review] Bug 14980 - Add a page showing one news Review of attachment 43404 [details] [review]: ----------------------------------------------------------------- Some small issues, noted below, and 2 other things: 1) You can access internal news (staff interface) via guessing ids. (blocker) 2) The feature is too hidden for my taste as we don't even show the id internally. A link 'Show in OPAC' or similar could be helpful. I'd also like to encourage you to talk to Viktor Sarge - I know he has been working on adding a 'Mini-CMS' feature to Koha and I think there are already some patches for small steps in that direction available on bugzilla. ::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-page.tt @@ +29,5 @@ > + > + <div id="page-main"> > + <h4 class="newsheader">[% data.title | html %]</h4> > + <div class="newsbody">[% data.new %]</div> > + <div class="newsfooter">(published on [% data.expirationdate %])</div> Please take a look at bugs 14246-14246 - it's a new feature that just passed QA that will allow to also display the author of a news. ::: opac/opac-page.pl @@ +15,5 @@ > +# You should have received a copy of the GNU General Public License > +# along with Koha; if not, see <http://www.gnu.org/licenses>. > + > +use strict; > +use warnings; Please always use Modern::Perl; @@ +31,5 @@ > + { > + template_name => "opac-page.tt", > + query => $query, > + type => "opac", > + authnotrequired => 1, Please check if this should be: authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
Nice idea. I added Martin Persson to the CC-list since he has developed something similar during our project, but I'm not shure if there is any Buzilla thread for it. We want to expand the news with an news archive as well + some other patches making the news a plausible replacement for a separate blog.
This is just a POC, needs more work
Hi Frido, I feel this is a duplicate to bug 14272 and bug 15326, do you agree? *** This bug has been marked as a duplicate of bug 14272 ***
(In reply to Katrin Fischer from comment #18) > Hi Frido, I feel this is a duplicate to bug 14272 and bug 15326, do you > agree? > > *** This bug has been marked as a duplicate of bug 14272 *** Yes thanks a lot :)