diff --git a/swad_changelog.h b/swad_changelog.h index 16a08c2f..c0722ab9 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -355,10 +355,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.3 (2018-10-09)" +#define Log_PLATFORM_VERSION "SWAD 18.3.1 (2018-10-09)" #define CSS_FILE "swad18.3.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.3.1: Oct 09, 2018 Changes in layout of session option. (234904 lines) Version 18.3: Oct 09, 2018 New icon in breadcrumb to go to user's courses. (234874 lines) Copy the following icons to icon public directory: sudo cp icon/theme/white/hierarchy64x64.png /var/www/html/swad/icon/theme/white/ diff --git a/swad_role.c b/swad_role.c index a49bebb2..70444c70 100644 --- a/swad_role.c +++ b/swad_role.c @@ -435,14 +435,17 @@ unsigned Rol_ConvertUnsignedStrToRoles (const char *UnsignedStr) /*********************** Put a form to change my role ************************/ /*****************************************************************************/ -void Rol_PutFormToChangeMyRole (void) +void Rol_PutFormToChangeMyRole (const char *ClassSelect) { extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; Rol_Role_t Role; Act_FormStart (ActChgMyRol); - fprintf (Gbl.F.Out,"", Gbl.Form.Id); for (Role = Rol_GST; Role < Rol_NUM_ROLES; diff --git a/swad_role.h b/swad_role.h index d0a9a26a..4c3fd712 100644 --- a/swad_role.h +++ b/swad_role.h @@ -52,7 +52,7 @@ void Rol_GetRolesInAllCrssIfNotYetGot (struct UsrData *UsrDat); Rol_Role_t Rol_ConvertUnsignedStrToRole (const char *UnsignedStr); unsigned Rol_ConvertUnsignedStrToRoles (const char *UnsignedStr); -void Rol_PutFormToChangeMyRole (void); +void Rol_PutFormToChangeMyRole (const char *ClassSelect); void Rol_ChangeMyRole (void); void Rol_WriteSelectorRoles (unsigned RolesAllowed,unsigned RolesSelected, diff --git a/swad_text.c b/swad_text.c index 85aea7ab..a69b4dd0 100644 --- a/swad_text.c +++ b/swad_text.c @@ -39051,9 +39051,30 @@ const char *Txt_Sender_permitted_click_to_ban_him = "Sender permitted; click to ban her/him"; // Necessita de tradução #endif +const char *Txt_Session = +#if L==1 + "Sessió"; +#elif L==2 + "Sitzung"; +#elif L==3 + "Session"; +#elif L==4 + "Sesión"; +#elif L==5 + "Session"; +#elif L==6 + "Sesión"; // Okoteve traducción +#elif L==7 + "Sessione"; +#elif L==8 + "Sesja"; +#elif L==9 + "Sessão"; +#endif + const char *Txt_session = #if L==1 - "sesión"; // Necessita traduccio + "sessió"; #elif L==2 "Sitzung"; #elif L==3 diff --git a/swad_user.c b/swad_user.c index 32c57083..c5c849dc 100644 --- a/swad_user.c +++ b/swad_user.c @@ -166,6 +166,8 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void); static void Usr_SetMyPrefsAndRoles (void); +static void Usr_PutLinkToLogOut (void); + static void Usr_InsertMyLastData (void); static void Usr_WriteRowGstAllData (struct UsrData *UsrDat); @@ -2576,7 +2578,7 @@ void Usr_WriteLoggedUsrHead (void) } else { - Rol_PutFormToChangeMyRole (); + Rol_PutFormToChangeMyRole ("SEL_ROLE"); fprintf (Gbl.F.Out," "); } @@ -3230,21 +3232,13 @@ void Usr_ShowFormsLogoutAndRole (void) { extern const char *Hlp_PROFILE_Session_role; extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Log_out; + extern const char *Txt_Session; extern const char *Txt_Role; extern const char *Txt_You_are_now_LOGGED_IN_as_X; extern const char *Txt_logged[Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; - /***** Link to log out *****/ - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActLogOut,NULL,NULL, - "logout-red64x64.png", - Txt_Log_out,Txt_Log_out, - NULL); - fprintf (Gbl.F.Out,"
"); - /***** Write message with my new logged role *****/ if (Gbl.Usrs.Me.Role.HasChanged) { @@ -3255,7 +3249,7 @@ void Usr_ShowFormsLogoutAndRole (void) } /***** Start box *****/ - Box_StartBox (NULL,Txt_Role,NULL, + Box_StartBox (NULL,Txt_Session,Usr_PutLinkToLogOut, Hlp_PROFILE_Session_role,Box_NOT_CLOSABLE); /***** Put a form to change my role *****/ @@ -3268,7 +3262,7 @@ void Usr_ShowFormsLogoutAndRole (void) { fprintf (Gbl.F.Out,""); } @@ -3276,6 +3270,21 @@ void Usr_ShowFormsLogoutAndRole (void) Box_EndBox (); } +/*****************************************************************************/ +/************** Put an icon (form) to close the current session **************/ +/*****************************************************************************/ + +static void Usr_PutLinkToLogOut (void) + { + extern const char *Txt_Log_out; + + /***** Put form to log out *****/ + Lay_PutContextualLink (ActLogOut,NULL,NULL, + "logout-red64x64.png", + Txt_Log_out,NULL, + NULL); + } + /*****************************************************************************/ /******* Check a user's code and get all user's data from user's code ********/ /*****************************************************************************/