From 0b998c6455ca039ff4b5150dc638984addcef457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 29 Apr 2017 19:32:06 +0200 Subject: [PATCH] Version 16.195.3 --- swad_changelog.h | 5 +++-- swad_group.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index dd7ef0c5a..282e1a2ab 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -223,14 +223,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.195.2 (2017-04-29)" +#define Log_PLATFORM_VERSION "SWAD 16.195.3 (2017-04-29)" #define CSS_FILE "swad16.193.4.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.195.2: Apr 29, 2017 Add plus icons in boxes "Types of group" and "Groups" when editing groups. (218512 lines) + Version 16.195.3: Apr 29, 2017 Add plus icon in box "Groups" when editing groups. (218537 lines) + Version 16.195.2: Apr 29, 2017 Add plus icon in box "Types of group" when editing groups. (218512 lines) Version 16.195.1: Apr 29, 2017 Code refactoring in edition of groups. (218474 lines) Version 16.195: Apr 29, 2017 Changes in edition of groups. (218470 lines) Version 16.194.22:Apr 29, 2017 Changes in edition of groups. (218433 lines) diff --git a/swad_group.c b/swad_group.c index 153046ed3..cfd5b9c9a 100644 --- a/swad_group.c +++ b/swad_group.c @@ -74,12 +74,16 @@ static void Grp_ConstructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **Al static void Grp_DestructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **AlreadyExistsGroupOfType); static void Grp_RemoveUsrFromGroup (long UsrCod,long GrpCod); static void Grp_AddUsrToGroup (struct UsrData *UsrDat,long GrpCod); + static void Grp_ListGroupTypesForEdition (void); static void Grp_PutIconsEditingGroupTypes (void); static void Grp_PutIconToViewGroups (void); static void Grp_PutIconToCreateNewGroupType (void); static void Grp_WriteHeadingGroupTypes (void); + static void Grp_ListGroupsForEdition (void); +static void Grp_PutIconsEditingGroups (void); +static void Grp_PutIconToCreateNewGroup (void); static void Grp_WriteHeadingGroups (void); static void Grp_PutIconToEditGroups (void); @@ -1355,7 +1359,8 @@ static void Grp_ListGroupsForEdition (void) struct Group *Grp; /***** Write heading *****/ - Lay_StartRoundFrameTable (NULL,Txt_Groups,NULL,Hlp_USERS_Groups,2); + Lay_StartRoundFrameTable (NULL,Txt_Groups,Grp_PutIconsEditingGroups, + Hlp_USERS_Groups,2); Grp_WriteHeadingGroups (); /***** List the groups *****/ @@ -1478,6 +1483,30 @@ static void Grp_ListGroupsForEdition (void) Lay_EndRoundFrameTable (); } +/*****************************************************************************/ +/**************** Put contextual icons in edition of groups ******************/ +/*****************************************************************************/ + +static void Grp_PutIconsEditingGroups (void) + { + /***** Put icon to view groups *****/ + Grp_PutIconToViewGroups (); + + /***** Put icon to create a new group *****/ + Grp_PutIconToCreateNewGroup (); + } + +static void Grp_PutIconToCreateNewGroup (void) + { + extern const char *Txt_New_group; + + /***** Put form to create a new group *****/ + Lay_PutContextualLink (ActReqEdiGrp,Grp_SECTION_NEW_GROUP,NULL, + "plus64x64.png", + Txt_New_group,NULL, + NULL); + } + /*****************************************************************************/ /************************** Write heading of groups **************************/ /*****************************************************************************/ @@ -2267,6 +2296,7 @@ static void Grp_PutFormToCreateGroup (void) unsigned NumGrpTyp; /***** Start form *****/ + fprintf (Gbl.F.Out,"
",Grp_SECTION_NEW_GROUP); Act_FormStartAnchor (ActNewGrp,Grp_SECTION_GROUPS); /***** Start of frame *****/ @@ -2339,6 +2369,7 @@ static void Grp_PutFormToCreateGroup (void) /***** End of form *****/ Act_FormEnd (); + fprintf (Gbl.F.Out,"
"); } /*****************************************************************************/