Version 15.158.4

This commit is contained in:
Antonio Cañas Vargas 2016-03-21 13:41:15 +01:00
parent 5a241bf599
commit cc3bf588e0
4 changed files with 65 additions and 32 deletions

View File

@ -134,14 +134,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.158.3 (2016-03-21)"
#define Log_PLATFORM_VERSION "SWAD 15.158.4 (2016-03-21)"
#define CSS_FILE "swad15.157.css"
#define JS_FILE "swad15.131.3.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 15.158.3: Mar 21, 2016 Change in layout of form to import test questions. (? lines)
Version 15.158.4: Mar 21, 2016 Icon to remove sent/received messages integrated in frame. (196300 lines)
Version 15.158.3: Mar 21, 2016 Change in layout of form to import test questions. (196277 lines)
Version 15.158.2: Mar 21, 2016 Icon to add new test question integrated in frame. (196283 lines)
Version 15.158.1: Mar 21, 2016 Button to add new test question. (196284 lines)
Version 15.158: Mar 21, 2016 Changes in layout of tests. (196274 lines)

View File

@ -75,6 +75,12 @@ static unsigned long Msg_GetNumUsrsBannedByMe (void);
static void Msg_PutLinkToViewBannedUsers(void);
static void Msg_ConstructQueryToSelectSentOrReceivedMsgs (char *Query,Msg_TypeOfMessages_t TypeOfMessages,long UsrCod,
long FilterCrsCod,const char *FilterFromToSubquery);
static void Msg_PutIconToRemoveOneRcvMsg (void);
static void Msg_PutIconToRemoveSevRcvMsgs (void);
static void Msg_PutIconToRemoveOneSntMsg (void);
static void Msg_PutIconToRemoveSevSntMsgs (void);
static void Msg_ShowFormToShowOnlyUnreadMessages (void);
static void Msg_GetParamOnlyUnreadMsgs (void);
static void Msg_ShowASentOrReceivedMessage (Msg_TypeOfMessages_t TypeOfMessages,long MsgNum,long MsgCod);
@ -1714,7 +1720,12 @@ static void Msg_ShowSentOrReceivedMessages (Msg_TypeOfMessages_t TypeOfMessages)
Lay_StartRoundFrame ("97%",
TypeOfMessages == Msg_MESSAGES_RECEIVED ? Txt_Messages_received :
Txt_Messages_sent,
NULL);
TypeOfMessages == Msg_MESSAGES_RECEIVED ? ((NumMsgs == 1) ? Msg_PutIconToRemoveOneRcvMsg :
((NumMsgs > 1) ? Msg_PutIconToRemoveSevRcvMsgs :
NULL)) :
((NumMsgs == 1) ? Msg_PutIconToRemoveOneSntMsg :
((NumMsgs > 1) ? Msg_PutIconToRemoveSevSntMsgs :
NULL)));
/* Write number of messages and number of new messages */
fprintf (Gbl.F.Out,"<div class=\"TIT CENTER_MIDDLE\">");
@ -1723,9 +1734,6 @@ static void Msg_ShowSentOrReceivedMessages (Msg_TypeOfMessages_t TypeOfMessages)
if (NumMsgs) // If there are messages...
{
/***** Show form to delete all messages *****/
Msg_ShowFormDelSentOrRecMsgs (TypeOfMessages,NumMsgs);
if (Gbl.Action.Act == ActExpRcvMsg) // Expanding a message, perhaps it is the result of following a link
// from a notification of received message, so show the page where the message is inside
{
@ -2297,26 +2305,51 @@ void Msg_WriteNumMsgs (unsigned NumMsgs,unsigned NumUnreadMsgs)
}
/*****************************************************************************/
/*************** Show form to delete sent or received messages ***************/
/***************** Put icon to remove one received message *******************/
/*****************************************************************************/
void Msg_ShowFormDelSentOrRecMsgs (Msg_TypeOfMessages_t TypeOfMessages,unsigned NumMsgs)
static void Msg_PutIconToRemoveOneRcvMsg (void)
{
extern const char *Txt_Remove_this_message;
extern const char *Txt_Remove_these_X_messages;
/***** Put link to request deletion of all sent or received messages *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
if (NumMsgs == 1)
strcpy (Gbl.Title,Txt_Remove_this_message);
else
sprintf (Gbl.Title,Txt_Remove_these_X_messages,NumMsgs);
Lay_PutContextualLink ((TypeOfMessages == Msg_MESSAGES_RECEIVED) ? ActReqDelAllRcvMsg :
ActReqDelAllSntMsg,
Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",
Gbl.Title,Gbl.Title);
fprintf (Gbl.F.Out,"</div>");
Lay_PutContextualLink (ActReqDelAllRcvMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_this_message,NULL);
}
/*****************************************************************************/
/*************** Put icon to remove several received messages ****************/
/*****************************************************************************/
static void Msg_PutIconToRemoveSevRcvMsgs (void)
{
extern const char *Txt_Remove_these_messages;
Lay_PutContextualLink (ActReqDelAllRcvMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_these_messages,NULL);
}
/*****************************************************************************/
/******************** Put icon to remove one sent message ********************/
/*****************************************************************************/
static void Msg_PutIconToRemoveOneSntMsg (void)
{
extern const char *Txt_Remove_this_message;
Lay_PutContextualLink (ActReqDelAllSntMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_this_message,NULL);
}
/*****************************************************************************/
/***************** Put icon to remove several sent messages ******************/
/*****************************************************************************/
static void Msg_PutIconToRemoveSevSntMsgs (void)
{
extern const char *Txt_Remove_these_messages;
Lay_PutContextualLink (ActReqDelAllSntMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_these_messages,NULL);
}
/*****************************************************************************/

View File

@ -89,7 +89,6 @@ unsigned long Msg_GetNumMsgsSentByUsr (long UsrCod);
unsigned Msg_GetNumMsgsSent (Sco_Scope_t Scope,Msg_Status_t MsgStatus);
unsigned Msg_GetNumMsgsReceived (Sco_Scope_t Scope,Msg_Status_t MsgStatus);
void Msg_WriteNumMsgs (unsigned NumMsgs,unsigned NumUnreadMsgs);
void Msg_ShowFormDelSentOrRecMsgs (Msg_TypeOfMessages_t TypeOfMessages,unsigned NumMsgs);
void Msg_PutHiddenParamsMsgsFilters (void);
void Msg_GetDistinctCoursesInMyMessages (Msg_TypeOfMessages_t TypeOfMessages);
void Msg_ShowFormSelectCourseSentOrRecMsgs (Msg_TypeOfMessages_t TypeOfMessages);

View File

@ -30026,25 +30026,25 @@ const char *Txt_Remove_the_users_indicated_in_step_1 =
"Tirar os utilizadores que est&atilde;o na lista";
#endif
const char *Txt_Remove_these_X_messages = // Warning: it is very important to include %u in the following sentences
const char *Txt_Remove_these_messages =
#if L==1
"Eliminar aquests %u missatges";
"Eliminar aquests missatges";
#elif L==2
"Diese %u Nachrichten entfernen";
"Diese Nachrichten entfernen";
#elif L==3
"Remove these %u messages";
"Remove these messages";
#elif L==4
"Eliminar estos %u mensajes";
"Eliminar estos mensajes";
#elif L==5
"Supprimer ces %u messages";
"Supprimer ces messages";
#elif L==6
"Eliminar estos %u mensajes"; // Okoteve traducción
"Eliminar estos mensajes"; // Okoteve traducción
#elif L==7
"Rimuovere questi %u messaggi";
"Rimuovere questi messaggi";
#elif L==8
"Usu&nacute; te %u wiadomo&sacute;ci";
"Usu&nacute; te wiadomo&sacute;ci";
#elif L==9
"Remover estas %u mensagens";
"Remover estas mensagens";
#endif
const char *Txt_Remove_type_of_group =