Bugzilla – Attachment 112296 Details for
Bug 26804
News: Move the news preview out of the table and into a modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26804: Limit the size of the News column in newst table
Bug-26804-Limit-the-size-of-the-News-column-in-new.patch (text/plain), 3.61 KB, created by
Lucas Gass (lukeg)
on 2020-10-23 18:11:24 UTC
(
hide
)
Description:
Bug 26804: Limit the size of the News column in newst table
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-10-23 18:11:24 UTC
Size:
3.61 KB
patch
obsolete
>From 509ae505e5213dc2b79e1a30c6e123c3a78ee682 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 23 Oct 2020 18:01:24 +0000 >Subject: [PATCH] Bug 26804: Limit the size of the News column in newst table > >This patch attempts to make the table on koha-news.tt more manaagable by limiting the width of the 'News' column and adding a sticky thead so you know what column you are looking at when you scroll through News Items > >To Test: >1. Add some HTML to a News Item. I am using a bunch of lorem ipsum HTML and this image set to 1000px. '<img src="https://koha-community.org/files/2013/09/cropped-kohabanner3.jpg" width="1000" />' but I'm not your overlord so choose your own way. >2. Look at /cgi-bin/koha/tools/koha-news.pl and see all your content in the News column. With a large image you have to scroll a long way to see the action buttons (Edit, Delete) >3. Apply patch >4. Regenerate the staff CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) >5. Clear you cache and again look at /cgi-bin/koha/tools/koha-news.pl. The table should only be 200px wide no matter the size of your content. >6. Scroll down and notice the thead stays with you. >7. Try testing at many different screen size. > >Question: Should we limit height as well? >--- > koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 11 +++++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 4 ++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index a698ec9bf9..3cae5b378f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1232,6 +1232,17 @@ div { > } > } > >+#newst { >+ thead { >+ position: sticky; >+ top: 0; >+ } >+ .news_content { >+ max-width: 200px; >+ overflow: hidden; >+ } >+} >+ > #header_search { > background-position: .5em .5em; > background-repeat: no-repeat; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >index c210a5b707..7c54cbd983 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt >@@ -123,7 +123,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <th class="title-string">Expiration date</th> > <th class="anti-the">Title</th> > <th>Author</th> >- <th class="anti-the">News</th> >+ <th class="news_content anti-the">News</th> > <th class="NoSort">Actions</th> > </tr></thead> > <tbody>[% FOREACH opac_new IN opac_news %] >@@ -155,7 +155,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> > <td><span title="[% opac_new.expirationdate | html %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</span></td> > <td>[% opac_new.title | html %]</td> > <td>[% opac_new.author_title | html %] [% opac_new.author_firstname | html %] [% opac_new.author_surname | html %]</td> >- <td> >+ <td class="news_content"> > [% opac_new.content | $raw %] > </td> > <td class="actions"> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26804
:
112296
|
112407
|
112629
|
112639
|
112683
|
112883
|
112953
|
112954