Forums | Mahara Community

Developers /
Smart Evidence column width


Gordon McLeod's profile picture
Posts: 190

26 October 2017, 4:05 AM

Hello,

We're just rolling out our first frameworks, but I've already had a few comments from staff about the default display. Basically, they have a collection of 6 pages as a template for the portfolio, and (you guessed it) only five are shown on the matrix - you need to click next to see the last one. The space between the columns is also fairly substantial, so the obvious solution might be to edit the css to make the columns slightly narrower and display more of them. I know the issue of 'how many pages to show' has been around since the early days of Mahara, this is just the most recent where someone has had to make a decision on what's reasonable to show on the screen.

My question is - is there a way to modify how this displays without editing the core code (eg using a skin css)?

I narrowed things down to this line in the code

<td class="mid" style="display: table-cell;"><span data-view="104093" data-option="22" class="icon icon-circle dot ">
 
and thought class="mid" could be used to specify a smaller width, but then how do I tell it to show an extra column?

Any advice before I burn a couple of days looking at this? I'm not allowed to edit the core code, so I'm hoping there is a way around it. It would be nice to have an admin setting to define column width/number at the level of a SmartEvidence matrix - most institutions are likely to only use a few, so might have preset evidence in mind for each.

Regards, Gordon.

Kristina Hoeppner's profile picture
Posts: 3366

26 October 2017, 7:56 AM

Hi Gordon,

A dev would need to answer your question of being able to pull more than 5 pages onto the page. I would have thought that you may only need to change the number of pages possible there as a CSS change may not do the trick. But need to wait for a dev to answer.

I would like to note though that while there may be enough space on a large screen between the pages, it certainly isn't the case when you are on a smaller device or have a smaller than maximum width view. Please keep that in mind. ;-)

I am wondering if we need a sort of "preview the entire SmartEvidence collection" button to pop up a modal in which you can see the entire matrix across your screen or, if there are too many pages to fit the screen, you'd consciously use the horizontal scrollbar as collections can contain an infinite amount of pages.

Cheers

Kristina

 

Robert Lyon's profile picture
Posts: 346

26 October 2017, 10:13 AM

The number of pages displayed in the SmartEvidence matrix is not governed by CSS but rather a value in the javascript.

In the htdocs/module/framework/js/matrix.js file on line 5 there is:

var range = 4; // The number of pages to display

This number is the count of pages to display after the 1st one (so 1 + 4 = 5 pages)
If you increase this number it will display more pages at once - currently this will mean a custom change.

I'll make a wishlist report to change this so it can be module setting

Cheers

Robert

3 results