mirror of https://github.com/acanas/swad-core.git
Version 16.184
This commit is contained in:
parent
91d7c3f717
commit
8528e41ef0
|
@ -2909,6 +2909,38 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
.BM0 {width:20px; text-align:center; vertical-align:middle; background-color:#F4F2EA;}
|
||||
.BM1 {width:20px; text-align:center; vertical-align:middle; background-color:#FBFAF7;}
|
||||
|
||||
/******************************** Pagination *********************************/
|
||||
.PAG
|
||||
{
|
||||
display:inline-block;
|
||||
box-sizing:border-box;
|
||||
margin:4px 2px;
|
||||
padding:2px 8px;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
border-radius:4px;
|
||||
border-color:#C0DAE4;
|
||||
}
|
||||
a.PAG:hover, .PAG_CUR
|
||||
{
|
||||
display:inline-block;
|
||||
box-sizing:border-box;
|
||||
margin:4px 2px;
|
||||
padding:2px 8px;
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
border-radius:4px;
|
||||
border-color:#C0DAE4;
|
||||
background-color:#DDECF1;
|
||||
text-decoration:none;
|
||||
}
|
||||
.PAG_TXT
|
||||
{
|
||||
font-size:13pt;
|
||||
font-weight:bold;
|
||||
color:#4D88A1;
|
||||
}
|
||||
|
||||
/***************************** Calls for exams *******************************/
|
||||
.CONV_TIT
|
||||
{
|
|
@ -214,13 +214,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.183.1 (2017-04-18)"
|
||||
#define CSS_FILE "swad16.181.css"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.184 (2017-04-18)"
|
||||
#define CSS_FILE "swad16.184.css"
|
||||
#define JS_FILE "swad16.181.js"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 16.184: Apr 18, 2017 Changes in layout of page numbers. (217724 lines)
|
||||
Version 16.183.1: Apr 18, 2017 Changes in layout of forums. (217719 lines)
|
||||
Version 16.183: Apr 18, 2017 Code refactoring in forums. (217738 lines)
|
||||
Version 16.182: Apr 18, 2017 Code refactoring in forums and pagination. (217678 lines)
|
||||
|
|
|
@ -126,7 +126,7 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
|||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
|
||||
Pag_WriteLinksToPages (WhatPaginate,
|
||||
ThrCod,
|
||||
Pagination,true,NULL,"TIT",false);
|
||||
Pagination,true,NULL,"PAG_TXT",false);
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
|
@ -140,14 +140,15 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
bool FirstMsgEnabled,const char *Subject,const char *Font,
|
||||
bool LinkToPagCurrent)
|
||||
{
|
||||
extern const char *Txt_Page;
|
||||
extern const char *Txt_See_page_X_of_Y;
|
||||
extern const char *Txt_Page_X_of_Y;
|
||||
extern const char *Txt_Post_banned;
|
||||
unsigned NumPage;
|
||||
char LinkStyle[64];
|
||||
|
||||
/***** Link to page 1, including a text *****/
|
||||
if (Subject)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div>");
|
||||
if (LinkToPagCurrent)
|
||||
{
|
||||
switch (WhatPaginate)
|
||||
|
@ -217,7 +218,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
break;
|
||||
}
|
||||
sprintf (Gbl.Title,Txt_See_page_X_of_Y,
|
||||
sprintf (Gbl.Title,Txt_Page_X_of_Y,
|
||||
1,Pagination->NumPags);
|
||||
Act_LinkFormSubmit (Gbl.Title,Font,NULL);
|
||||
}
|
||||
|
@ -226,8 +227,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
if (FirstMsgEnabled)
|
||||
fprintf (Gbl.F.Out,"%s",Subject);
|
||||
else
|
||||
fprintf (Gbl.F.Out,"[%s]",
|
||||
Txt_Post_banned);
|
||||
fprintf (Gbl.F.Out,"[%s]",Txt_Post_banned);
|
||||
if (LinkToPagCurrent)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</a>");
|
||||
|
@ -235,23 +235,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"</span>");
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
/***** Links to several pages start here *****/
|
||||
if (Pagination->MoreThanOnePage)
|
||||
{
|
||||
/***** Links to several pages start here *****/
|
||||
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_CENTER CELLS_PAD_5\">"
|
||||
"<tr>"
|
||||
"<td class=\"%s LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Font,Txt_Page);
|
||||
sprintf (LinkStyle,"PAG %s",Font);
|
||||
|
||||
/***** Possible link to page 1 *****/
|
||||
if (Pagination->StartPage > 1)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
Font);
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
|
@ -319,25 +313,20 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
break;
|
||||
}
|
||||
sprintf (Gbl.Title,Txt_See_page_X_of_Y,
|
||||
sprintf (Gbl.Title,Txt_Page_X_of_Y,
|
||||
1,Pagination->NumPags);
|
||||
Act_LinkFormSubmit (Gbl.Title,Font,NULL);
|
||||
fprintf (Gbl.F.Out,"1</a>");
|
||||
Act_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
||||
fprintf (Gbl.F.Out,"1"
|
||||
"</a>");
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
if (Pagination->LeftPage > 2)
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">"
|
||||
"…"
|
||||
"</td>",
|
||||
Font);
|
||||
fprintf (Gbl.F.Out,"<span class=\"%s\">…</span>",Font);
|
||||
}
|
||||
|
||||
/***** Posible link to page left *****/
|
||||
if (Pagination->LeftPage > 1 &&
|
||||
Pagination->LeftPage < Pagination->StartPage)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
Font);
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
|
@ -405,19 +394,15 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
break;
|
||||
}
|
||||
sprintf (Gbl.Title,Txt_See_page_X_of_Y,
|
||||
sprintf (Gbl.Title,Txt_Page_X_of_Y,
|
||||
Pagination->LeftPage,
|
||||
Pagination->NumPags);
|
||||
Act_LinkFormSubmit (Gbl.Title,Font,NULL);
|
||||
Act_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
||||
fprintf (Gbl.F.Out,"%u</a>",
|
||||
Pagination->LeftPage);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
if (Pagination->LeftPage < Pagination->StartPage - 1)
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">"
|
||||
"…"
|
||||
"</td>",
|
||||
Font);
|
||||
fprintf (Gbl.F.Out,"<span class=\"%s\">…</span>",Font);
|
||||
}
|
||||
|
||||
/***** Loop to put links to the pages around the current one *****/
|
||||
|
@ -425,10 +410,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
NumPage <= Pagination->EndPage;
|
||||
NumPage++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
Font);
|
||||
sprintf (Gbl.Title,Txt_Page_X_of_Y,
|
||||
NumPage,Pagination->NumPags);
|
||||
if (!LinkToPagCurrent && NumPage == Pagination->CurrentPage)
|
||||
fprintf (Gbl.F.Out,"<u>%u</u>",NumPage);
|
||||
fprintf (Gbl.F.Out,"<span title=\"%s\" class=\"PAG_CUR %s\">"
|
||||
"%u"
|
||||
"</span>",
|
||||
Gbl.Title,Font,NumPage);
|
||||
else
|
||||
{
|
||||
switch (WhatPaginate)
|
||||
|
@ -498,14 +486,11 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
break;
|
||||
}
|
||||
sprintf (Gbl.Title,Txt_See_page_X_of_Y,
|
||||
NumPage,Pagination->NumPags);
|
||||
Act_LinkFormSubmit (Gbl.Title,Font,NULL);
|
||||
Act_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
||||
fprintf (Gbl.F.Out,"%u</a>",
|
||||
NumPage);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
}
|
||||
|
||||
/***** Posible link to page right *****/
|
||||
|
@ -513,12 +498,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Pagination->RightPage < Pagination->NumPags)
|
||||
{
|
||||
if (Pagination->RightPage > Pagination->EndPage + 1)
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">"
|
||||
"…"
|
||||
"</td>",
|
||||
Font);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
Font);
|
||||
fprintf (Gbl.F.Out,"<span class=\"%s\">…</span>",Font);
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
|
@ -586,24 +566,18 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
break;
|
||||
}
|
||||
sprintf (Gbl.Title,Txt_See_page_X_of_Y,
|
||||
sprintf (Gbl.Title,Txt_Page_X_of_Y,
|
||||
Pagination->RightPage,Pagination->NumPags);
|
||||
Act_LinkFormSubmit (Gbl.Title,Font,NULL);
|
||||
Act_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
||||
fprintf (Gbl.F.Out,"%u</a>",Pagination->RightPage);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
}
|
||||
|
||||
/***** Possible link to last page *****/
|
||||
if (Pagination->EndPage < Pagination->NumPags)
|
||||
{
|
||||
if (Pagination->NumPags > Pagination->RightPage + 1)
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">"
|
||||
"…"
|
||||
"</td>",
|
||||
Font);
|
||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
|
||||
Font);
|
||||
fprintf (Gbl.F.Out,"<span class=\"%s\">…</span>",Font);
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
|
@ -671,15 +645,12 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
Usr_PutParamOtherUsrCodEncrypted ();
|
||||
break;
|
||||
}
|
||||
sprintf (Gbl.Title,Txt_See_page_X_of_Y,
|
||||
sprintf (Gbl.Title,Txt_Page_X_of_Y,
|
||||
Pagination->NumPags,Pagination->NumPags);
|
||||
Act_LinkFormSubmit (Gbl.Title,Font,NULL);
|
||||
Act_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
||||
fprintf (Gbl.F.Out,"%u</a>",Pagination->NumPags);
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</tr>"
|
||||
"</table>");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
46
swad_text.c
46
swad_text.c
|
@ -28389,7 +28389,7 @@ const char *Txt_out_of_PART_OF_A_SCORE = // Example: score is 2 out of 10
|
|||
#elif L==9
|
||||
"out of";
|
||||
#endif
|
||||
|
||||
/* TODO: Remove if not used
|
||||
const char *Txt_Page =
|
||||
#if L==1
|
||||
"Pàg.";
|
||||
|
@ -28410,7 +28410,7 @@ const char *Txt_Page =
|
|||
#elif L==9
|
||||
"Pág.";
|
||||
#endif
|
||||
|
||||
*/
|
||||
const char *Txt_page =
|
||||
#if L==1
|
||||
"pàg.";
|
||||
|
@ -28432,6 +28432,27 @@ const char *Txt_page =
|
|||
"pág.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Page_X_of_Y = // Warning: it is very important to include two %u in the following sentences
|
||||
#if L==1
|
||||
"Pàgina %u de %u";
|
||||
#elif L==2
|
||||
"Seite %u von %u";
|
||||
#elif L==3
|
||||
"Page %u of %u";
|
||||
#elif L==4
|
||||
"Página %u de %u";
|
||||
#elif L==5
|
||||
"Page %u de %u";
|
||||
#elif L==6
|
||||
"Página %u de %u"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Pagina %u di %u";
|
||||
#elif L==8
|
||||
"Strona %u z %u";
|
||||
#elif L==9
|
||||
"Página %u de %u";
|
||||
#endif
|
||||
|
||||
const char *Txt_PAGE1_Page_generated_in =
|
||||
#if L==1
|
||||
"Pàgina generada en";
|
||||
|
@ -36165,27 +36186,6 @@ const char *Txt_See_notifications =
|
|||
"Veja notificações";
|
||||
#endif
|
||||
|
||||
const char *Txt_See_page_X_of_Y = // Warning: it is very important to include two %u in the following sentences
|
||||
#if L==1
|
||||
"Ver página %u de %u"; // Necessita traduccio
|
||||
#elif L==2
|
||||
"Siehe Seite %u von %u";
|
||||
#elif L==3
|
||||
"See page %u of %u";
|
||||
#elif L==4
|
||||
"Ver página %u de %u";
|
||||
#elif L==5
|
||||
"Voir page %u de %u";
|
||||
#elif L==6
|
||||
"Ver página %u de %u"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Vedi pagina %u di %u";
|
||||
#elif L==8
|
||||
"See page %u of %u"; // Potrzebujesz tlumaczenie
|
||||
#elif L==9
|
||||
"Veja página %u de %u";
|
||||
#endif
|
||||
|
||||
const char *Txt_Select_another_country =
|
||||
#if L==1
|
||||
"Seleccionar un altre país";
|
||||
|
|
Loading…
Reference in New Issue