diff --git a/css/swad16.181.css b/css/swad16.184.css similarity index 99% rename from css/swad16.181.css rename to css/swad16.184.css index 27cfd9e5b..6f6a2bb83 100644 --- a/css/swad16.181.css +++ b/css/swad16.184.css @@ -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 { diff --git a/swad_changelog.h b/swad_changelog.h index 908badba6..4aced666e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -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) diff --git a/swad_pagination.c b/swad_pagination.c index 507c75d30..085f8c196 100644 --- a/swad_pagination.c +++ b/swad_pagination.c @@ -126,7 +126,7 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate, fprintf (Gbl.F.Out,"
" - "%s" - " | ", - Font,Txt_Page); + sprintf (LinkStyle,"PAG %s",Font); /***** Possible link to page 1 *****/ if (Pagination->StartPage > 1) { - fprintf (Gbl.F.Out,"", - 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"); + Act_LinkFormSubmit (Gbl.Title,LinkStyle,NULL); + fprintf (Gbl.F.Out,"1" + ""); Act_FormEnd (); - fprintf (Gbl.F.Out," | "); if (Pagination->LeftPage > 2) - fprintf (Gbl.F.Out,"" - "…" - " | ", - Font); + fprintf (Gbl.F.Out,"…",Font); } /***** Posible link to page left *****/ if (Pagination->LeftPage > 1 && Pagination->LeftPage < Pagination->StartPage) { - fprintf (Gbl.F.Out,"", - 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", Pagination->LeftPage); Act_FormEnd (); - fprintf (Gbl.F.Out," | "); if (Pagination->LeftPage < Pagination->StartPage - 1) - fprintf (Gbl.F.Out,"" - "…" - " | ", - Font); + fprintf (Gbl.F.Out,"…",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,"", - Font); + sprintf (Gbl.Title,Txt_Page_X_of_Y, + NumPage,Pagination->NumPags); if (!LinkToPagCurrent && NumPage == Pagination->CurrentPage) - fprintf (Gbl.F.Out,"%u",NumPage); + fprintf (Gbl.F.Out,"" + "%u" + "", + 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", NumPage); Act_FormEnd (); } - fprintf (Gbl.F.Out," | "); } /***** 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,"" - "…" - " | ", - Font); - fprintf (Gbl.F.Out,"", - Font); + fprintf (Gbl.F.Out,"…",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",Pagination->RightPage); Act_FormEnd (); - fprintf (Gbl.F.Out," | "); } /***** Possible link to last page *****/ if (Pagination->EndPage < Pagination->NumPags) { if (Pagination->NumPags > Pagination->RightPage + 1) - fprintf (Gbl.F.Out,"" - "…" - " | ", - Font); - fprintf (Gbl.F.Out,"", - Font); + fprintf (Gbl.F.Out,"…",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",Pagination->NumPags); Act_FormEnd (); - fprintf (Gbl.F.Out," | "); } - fprintf (Gbl.F.Out,"