mirror of https://github.com/acanas/swad-core.git
Version19.71.2
This commit is contained in:
parent
158cff8439
commit
23680ed22e
|
@ -488,13 +488,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.71.1 (2019-11-17)"
|
#define Log_PLATFORM_VERSION "SWAD 19.71.2 (2019-11-17)"
|
||||||
#define CSS_FILE "swad19.71.css"
|
#define CSS_FILE "swad19.71.css"
|
||||||
#define JS_FILE "swad19.70.js"
|
#define JS_FILE "swad19.70.js"
|
||||||
/*
|
/*
|
||||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
|
|
||||||
|
Version 19.71.2: Nov 17, 2019 Converting links to buttons. (247034 lines)
|
||||||
Version 19.71.1: Nov 17, 2019 Converting links to buttons.
|
Version 19.71.1: Nov 17, 2019 Converting links to buttons.
|
||||||
Changes in forums. (247029 lines)
|
Changes in forums. (247029 lines)
|
||||||
Version 19.71: Nov 17, 2019 Converting links to buttons. (247076 lines)
|
Version 19.71: Nov 17, 2019 Converting links to buttons. (247076 lines)
|
||||||
|
|
|
@ -3359,7 +3359,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
||||||
Thr.Enabled[For_FIRST_MSG],
|
Thr.Enabled[For_FIRST_MSG],
|
||||||
Thr.Subject,
|
Thr.Subject,
|
||||||
Thr.NumUnreadPosts ? The_ClassFormInBoxBold[Gbl.Prefs.Theme] :
|
Thr.NumUnreadPosts ? The_ClassFormInBoxBold[Gbl.Prefs.Theme] :
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
true);
|
true);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
/********************************** Headers **********************************/
|
/********************************** Headers **********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE // For asprintf
|
||||||
#include <linux/stddef.h> // For NULL
|
#include <linux/stddef.h> // For NULL
|
||||||
|
#include <stdio.h> // For asprintf
|
||||||
|
|
||||||
#include "swad_action.h"
|
#include "swad_action.h"
|
||||||
#include "swad_database.h"
|
#include "swad_database.h"
|
||||||
|
@ -142,13 +144,17 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||||
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
long ThrCod,
|
long ThrCod,
|
||||||
struct Pagination *Pagination,
|
struct Pagination *Pagination,
|
||||||
bool FirstMsgEnabled,const char *Subject,const char *Font,
|
bool FirstMsgEnabled,
|
||||||
|
const char *Subject,const char *ClassTxt,
|
||||||
bool LinkToPagCurrent)
|
bool LinkToPagCurrent)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Page_X_of_Y;
|
extern const char *Txt_Page_X_of_Y;
|
||||||
extern const char *Txt_FORUM_Post_banned;
|
extern const char *Txt_FORUM_Post_banned;
|
||||||
unsigned NumPage;
|
unsigned NumPage;
|
||||||
char LinkStyle[64];
|
char *ClassLink;
|
||||||
|
|
||||||
|
if (asprintf (&ClassLink,"BT_LINK PAG %s",ClassTxt) < 0)
|
||||||
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
/***** Link to page 1, including a text *****/
|
/***** Link to page 1, including a text *****/
|
||||||
if (Subject)
|
if (Subject)
|
||||||
|
@ -240,17 +246,17 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
Txt_Page_X_of_Y,
|
Txt_Page_X_of_Y,
|
||||||
1,Pagination->NumPags);
|
1,Pagination->NumPags);
|
||||||
Frm_LinkFormSubmit (Gbl.Title,Font,NULL);
|
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
HTM_SPAN_Begin ("class=\"%s\"",Font);
|
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
|
||||||
if (FirstMsgEnabled)
|
if (FirstMsgEnabled)
|
||||||
HTM_Txt (Subject);
|
HTM_Txt (Subject);
|
||||||
else
|
else
|
||||||
HTM_TxtF ("[%s]",Txt_FORUM_Post_banned);
|
HTM_TxtF ("[%s]",Txt_FORUM_Post_banned);
|
||||||
if (LinkToPagCurrent)
|
if (LinkToPagCurrent)
|
||||||
{
|
{
|
||||||
Frm_LinkFormEnd ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -261,10 +267,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
/***** Links to several pages start here *****/
|
/***** Links to several pages start here *****/
|
||||||
if (Pagination->MoreThanOnePage)
|
if (Pagination->MoreThanOnePage)
|
||||||
{
|
{
|
||||||
snprintf (LinkStyle,sizeof (LinkStyle),
|
|
||||||
"PAG %s",
|
|
||||||
Font);
|
|
||||||
|
|
||||||
/***** Possible link to page 1 *****/
|
/***** Possible link to page 1 *****/
|
||||||
if (Pagination->StartPage > 1)
|
if (Pagination->StartPage > 1)
|
||||||
{
|
{
|
||||||
|
@ -352,13 +354,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
Txt_Page_X_of_Y,
|
Txt_Page_X_of_Y,
|
||||||
1,Pagination->NumPags);
|
1,Pagination->NumPags);
|
||||||
Frm_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||||
HTM_Unsigned (1);
|
HTM_Unsigned (1);
|
||||||
Frm_LinkFormEnd ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
if (Pagination->LeftPage > 2)
|
if (Pagination->LeftPage > 2)
|
||||||
{
|
{
|
||||||
HTM_SPAN_Begin ("class=\"%s\"",Font);
|
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
|
||||||
HTM_Txt ("…");
|
HTM_Txt ("…");
|
||||||
HTM_SPAN_End ();
|
HTM_SPAN_End ();
|
||||||
}
|
}
|
||||||
|
@ -453,13 +455,13 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
Txt_Page_X_of_Y,
|
Txt_Page_X_of_Y,
|
||||||
Pagination->LeftPage,
|
Pagination->LeftPage,
|
||||||
Pagination->NumPags);
|
Pagination->NumPags);
|
||||||
Frm_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||||
HTM_Unsigned (Pagination->LeftPage);
|
HTM_Unsigned (Pagination->LeftPage);
|
||||||
Frm_LinkFormEnd ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
if (Pagination->LeftPage < Pagination->StartPage - 1)
|
if (Pagination->LeftPage < Pagination->StartPage - 1)
|
||||||
{
|
{
|
||||||
HTM_SPAN_Begin ("class=\"%s\"",Font);
|
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
|
||||||
HTM_Txt ("…");
|
HTM_Txt ("…");
|
||||||
HTM_SPAN_End ();
|
HTM_SPAN_End ();
|
||||||
}
|
}
|
||||||
|
@ -475,7 +477,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
NumPage,Pagination->NumPags);
|
NumPage,Pagination->NumPags);
|
||||||
if (!LinkToPagCurrent && NumPage == Pagination->CurrentPage)
|
if (!LinkToPagCurrent && NumPage == Pagination->CurrentPage)
|
||||||
{
|
{
|
||||||
HTM_SPAN_Begin ("title=\"%s\" class=\"PAG_CUR %s\"",Gbl.Title,Font);
|
HTM_SPAN_Begin ("title=\"%s\" class=\"PAG_CUR %s\"",Gbl.Title,ClassTxt);
|
||||||
HTM_Unsigned (NumPage);
|
HTM_Unsigned (NumPage);
|
||||||
HTM_SPAN_End ();
|
HTM_SPAN_End ();
|
||||||
}
|
}
|
||||||
|
@ -562,9 +564,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
Usr_PutParamOtherUsrCodEncrypted ();
|
Usr_PutParamOtherUsrCodEncrypted ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Frm_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||||
HTM_Unsigned (NumPage);
|
HTM_Unsigned (NumPage);
|
||||||
Frm_LinkFormEnd ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -575,7 +577,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
{
|
{
|
||||||
if (Pagination->RightPage > Pagination->EndPage + 1)
|
if (Pagination->RightPage > Pagination->EndPage + 1)
|
||||||
{
|
{
|
||||||
HTM_SPAN_Begin ("class=\"%s\"",Font);
|
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
|
||||||
HTM_Txt ("…");
|
HTM_Txt ("…");
|
||||||
HTM_SPAN_End ();
|
HTM_SPAN_End ();
|
||||||
}
|
}
|
||||||
|
@ -663,9 +665,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
Txt_Page_X_of_Y,
|
Txt_Page_X_of_Y,
|
||||||
Pagination->RightPage,Pagination->NumPags);
|
Pagination->RightPage,Pagination->NumPags);
|
||||||
Frm_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||||
HTM_Unsigned (Pagination->RightPage);
|
HTM_Unsigned (Pagination->RightPage);
|
||||||
Frm_LinkFormEnd ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,7 +676,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
{
|
{
|
||||||
if (Pagination->NumPags > Pagination->RightPage + 1)
|
if (Pagination->NumPags > Pagination->RightPage + 1)
|
||||||
{
|
{
|
||||||
HTM_SPAN_Begin ("class=\"%s\"",Font);
|
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
|
||||||
HTM_Txt ("…");
|
HTM_Txt ("…");
|
||||||
HTM_SPAN_End ();
|
HTM_SPAN_End ();
|
||||||
}
|
}
|
||||||
|
@ -762,12 +764,14 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||||
Txt_Page_X_of_Y,
|
Txt_Page_X_of_Y,
|
||||||
Pagination->NumPags,Pagination->NumPags);
|
Pagination->NumPags,Pagination->NumPags);
|
||||||
Frm_LinkFormSubmit (Gbl.Title,LinkStyle,NULL);
|
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||||
HTM_Unsigned (Pagination->NumPags);
|
HTM_Unsigned (Pagination->NumPags);
|
||||||
Frm_LinkFormEnd ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free (ClassLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -79,7 +79,8 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||||
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||||
long ThrCod,
|
long ThrCod,
|
||||||
struct Pagination *Pagination,
|
struct Pagination *Pagination,
|
||||||
bool FirstMsgEnabled,const char *Subject,const char *Font,
|
bool FirstMsgEnabled,
|
||||||
|
const char *Subject,const char *ClassTxt,
|
||||||
bool LinkToPagCurrent);
|
bool LinkToPagCurrent);
|
||||||
void Pag_PutHiddenParamPagNum (Pag_WhatPaginate_t WhatPaginate,unsigned NumPage);
|
void Pag_PutHiddenParamPagNum (Pag_WhatPaginate_t WhatPaginate,unsigned NumPage);
|
||||||
unsigned Pag_GetParamPagNum (Pag_WhatPaginate_t WhatPaginate);
|
unsigned Pag_GetParamPagNum (Pag_WhatPaginate_t WhatPaginate);
|
||||||
|
|
Loading…
Reference in New Issue