diff --git a/swad_centre.c b/swad_centre.c
index 6b5e8071..48971661 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -73,7 +73,7 @@ static void Ctr_Configuration (bool PrintView);
static void Ctr_ListCentres (void);
static void Ctr_ListCentresForSeeing (bool ICanEdit);
-static void Ctr_PutIconToEdit (void);
+static void Ctr_PutIconToEditFrames (void);
static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr);
static void Ctr_GetParamCtrOrderType (void);
static void Ctr_GetPhotoAttribution (long CtrCod,char **PhotoAttribution);
@@ -622,7 +622,7 @@ static void Ctr_ListCentresForSeeing (bool ICanEdit)
sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X,
Gbl.CurrentIns.Ins.FullName);
Lay_StartRoundFrame (NULL,Gbl.Title,
- ICanEdit ? Ctr_PutIconToEdit :
+ ICanEdit ? Ctr_PutIconToEditFrames :
NULL);
fprintf (Gbl.F.Out,"
");
Ctr_PutHeadCentresForSeeing (true); // Order selectable
@@ -642,7 +642,7 @@ static void Ctr_ListCentresForSeeing (bool ICanEdit)
/********************** Put link (form) to edit centres **********************/
/*****************************************************************************/
-static void Ctr_PutIconToEdit (void)
+static void Ctr_PutIconToEditFrames (void)
{
extern const char *Txt_Edit;
diff --git a/swad_changelog.h b/swad_changelog.h
index 1e61f4e6..bac122cb 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -129,14 +129,15 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.147.4 (2016-03-16)"
+#define Log_PLATFORM_VERSION "SWAD 15.147.5 (2016-03-16)"
#define CSS_FILE "swad15.146.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.147.4: Mar 16, 2016 Icon to edit places integrated in frame. (? lines)
+ Version 15.147.5: Mar 16, 2016 Icon to edit links integrated in frame. (195863 lines)
+ Version 15.147.4: Mar 16, 2016 Icon to edit places integrated in frame. (195866 lines)
Version 15.147.3: Mar 16, 2016 Icon to edit groups integrated in frame. (195867 lines)
Version 15.147.2: Mar 16, 2016 Icon to edit degree types integrated in frame. (195866 lines)
Version 15.147.1: Mar 16, 2016 Removed links to view when editing. (195854 lines)
diff --git a/swad_country.c b/swad_country.c
index 29514484..954c950d 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -66,7 +66,7 @@ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
static void Cty_Configuration (bool PrintView);
-static void Cty_PutIconToEdit (void);
+static void Cty_PutIconToEditCountries (void);
static unsigned Cty_GetNumUsrsWhoClaimToBelongToCty (long CtyCod);
static void Cty_GetParamCtyOrderType (void);
@@ -502,7 +502,7 @@ void Cty_ListCountries2 (void)
/***** Table head *****/
Lay_StartRoundFrame (NULL,Txt_Countries,
- Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM ? Cty_PutIconToEdit :
+ Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM ? Cty_PutIconToEditCountries :
NULL);
fprintf (Gbl.F.Out,""
"");
@@ -682,7 +682,7 @@ void Cty_ListCountries2 (void)
/********************* Put link (form) to edit countries *********************/
/*****************************************************************************/
-static void Cty_PutIconToEdit (void)
+static void Cty_PutIconToEditCountries (void)
{
extern const char *Txt_Edit;
diff --git a/swad_course.c b/swad_course.c
index 4e28ce89..112cc526 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -81,7 +81,7 @@ static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses);
static void Crs_ListCourses (void);
static void Crs_EditCourses (void);
static void Crs_ListCoursesForSeeing (bool ICanEdit);
-static void Crs_PutIconToEdit (void);
+static void Crs_PutIconToEditCourses (void);
static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year);
static void Crs_ListCoursesForEdition (void);
static bool Crs_CheckIfICanEdit (struct Course *Crs);
@@ -1151,7 +1151,7 @@ static void Crs_ListCoursesForSeeing (bool ICanEdit)
sprintf (Gbl.Title,Txt_Courses_of_DEGREE_X,
Gbl.CurrentDeg.Deg.ShortName);
Lay_StartRoundFrame (NULL,Gbl.Title,
- ICanEdit ? Crs_PutIconToEdit :
+ ICanEdit ? Crs_PutIconToEditCourses :
NULL);
fprintf (Gbl.F.Out,"");
Crs_PutHeadCoursesForSeeing ();
@@ -1173,7 +1173,7 @@ static void Crs_ListCoursesForSeeing (bool ICanEdit)
/********************** Put link (form) to edit courses **********************/
/*****************************************************************************/
-static void Crs_PutIconToEdit (void)
+static void Crs_PutIconToEditCourses (void)
{
extern const char *Txt_Edit;
diff --git a/swad_degree.c b/swad_degree.c
index 180fcb59..5ae40ffd 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -92,8 +92,8 @@ static void Deg_EditDegreeTypes (void);
static void Deg_ListDegreeTypesForSeeing (void);
static void Deg_ListDegreeTypesForEdition (void);
static void Deg_ListDegreesForSeeing (bool ICanEdit);
-static void Deg_PutIconToEditDegTyp (void);
-static void Deg_PutIconToEditDeg (void);
+static void Deg_PutIconToEditDegTypes (void);
+static void Deg_PutIconToEditDegrees (void);
static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg);
static void Deg_ListDegreesForEdition (void);
static bool Deg_CheckIfICanEdit (struct Degree *Deg);
@@ -1148,7 +1148,7 @@ static void Deg_ListDegreeTypesForSeeing (void)
/***** Write heading *****/
Lay_StartRoundFrame (NULL,Txt_Types_of_degree,
- Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM ? Deg_PutIconToEditDegTyp :
+ Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM ? Deg_PutIconToEditDegTypes :
NULL);
fprintf (Gbl.F.Out,"");
Deg_PutHeadDegreeTypesForSeeing ();
@@ -1274,7 +1274,7 @@ static void Deg_ListDegreesForSeeing (bool ICanEdit)
sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X,
Gbl.CurrentCtr.Ctr.ShortName);
Lay_StartRoundFrame (NULL,Gbl.Title,
- ICanEdit ? Deg_PutIconToEditDeg :
+ ICanEdit ? Deg_PutIconToEditDegrees :
NULL);
fprintf (Gbl.F.Out,"");
Deg_PutHeadDegreesForSeeing ();
@@ -1294,7 +1294,7 @@ static void Deg_ListDegreesForSeeing (bool ICanEdit)
/******************* Put link (form) to edit degree types ********************/
/*****************************************************************************/
-static void Deg_PutIconToEditDegTyp (void)
+static void Deg_PutIconToEditDegTypes (void)
{
extern const char *Txt_Edit;
@@ -1305,7 +1305,7 @@ static void Deg_PutIconToEditDegTyp (void)
/********************** Put link (form) to edit degrees **********************/
/*****************************************************************************/
-static void Deg_PutIconToEditDeg (void)
+static void Deg_PutIconToEditDegrees (void)
{
extern const char *Txt_Edit;
diff --git a/swad_group.c b/swad_group.c
index fe562b3f..5ed53f3a 100644
--- a/swad_group.c
+++ b/swad_group.c
@@ -70,7 +70,7 @@ static void Grp_ListGroupTypesForEdition (void);
static void Grp_WriteHeadingGroupTypes (void);
static void Grp_ListGroupsForEdition (void);
static void Grp_WriteHeadingGroups (void);
-static void Grp_PutIconToEdit (void);
+static void Grp_PutIconToEditGroups (void);
static void Grp_ShowWarningToStdsToChangeGrps (void);
static unsigned Grp_ListGrpsForChange (struct GroupType *GrpTyp);
@@ -1569,7 +1569,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_My_groups,
- ICanEdit ? Grp_PutIconToEdit :
+ ICanEdit ? Grp_PutIconToEditGroups :
NULL);
/***** Start form *****/
@@ -1604,7 +1604,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
/*************************** Put icon to edit groups *************************/
/*****************************************************************************/
-static void Grp_PutIconToEdit (void)
+static void Grp_PutIconToEditGroups (void)
{
extern const char *Txt_Edit;
diff --git a/swad_institution.c b/swad_institution.c
index da9169c8..897a72eb 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -67,7 +67,7 @@ static void Ins_Configuration (bool PrintView);
static void Ins_ListInstitutions (void);
static void Ins_ListInstitutionsForSeeing (bool ICanEdit);
-static void Ins_PutIconToEdit (void);
+static void Ins_PutIconToEditInstitutions (void);
static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned NumIns);
static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable);
static void Ins_GetParamInsOrderType (void);
@@ -556,7 +556,7 @@ static void Ins_ListInstitutionsForSeeing (bool ICanEdit)
sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X,
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]);
Lay_StartRoundFrame (NULL,Gbl.Title,
- ICanEdit ? Ins_PutIconToEdit :
+ ICanEdit ? Ins_PutIconToEditInstitutions :
NULL);
fprintf (Gbl.F.Out,"");
Ins_PutHeadInstitutionsForSeeing (true); // Order selectable
@@ -576,7 +576,7 @@ static void Ins_ListInstitutionsForSeeing (bool ICanEdit)
/******************** Put link (form) to edit institutions *******************/
/*****************************************************************************/
-static void Ins_PutIconToEdit (void)
+static void Ins_PutIconToEditInstitutions (void)
{
extern const char *Txt_Edit;
diff --git a/swad_link.c b/swad_link.c
index dd50b39f..45841cb3 100644
--- a/swad_link.c
+++ b/swad_link.c
@@ -58,9 +58,9 @@ extern struct Globals Gbl;
/***************************** Private prototypes ****************************/
/*****************************************************************************/
+static void Lnk_PutIconToEditLinks (void);
static void Lnk_WriteListOfLinks (void);
-static void Lnk_PutFormToEditLinks (void);
static void Lnk_ListLinksForEdition (void);
static void Lnk_PutParamLnkCod (long LnkCod);
static void Lnk_RenameLink (Cns_ShortOrFullName_t ShortOrFullName);
@@ -80,14 +80,12 @@ void Lnk_SeeLinks (void)
/***** Get list of links *****/
Lnk_GetListLinks ();
- /***** Put link (form) to edit links *****/
- if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
- Lnk_PutFormToEditLinks ();
-
/***** Write all the links *****/
if (Gbl.Links.Num)
{
- Lay_StartRoundFrame (NULL,Txt_Links,NULL);
+ Lay_StartRoundFrame (NULL,Txt_Links,
+ Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM ? Lnk_PutIconToEditLinks :
+ NULL);
Lnk_WriteListOfLinks ();
Lay_EndRoundFrame ();
}
@@ -96,6 +94,16 @@ void Lnk_SeeLinks (void)
Lnk_FreeListLinks ();
}
+/*****************************************************************************/
+/************************** Put icon to edit links ***************************/
+/*****************************************************************************/
+
+static void Lnk_PutIconToEditLinks (void)
+ {
+ extern const char *Txt_Edit;
+
+ Lay_PutContextualLink (ActEdiLnk,NULL,"edit64x64.png",Txt_Edit,NULL);
+ }
/*****************************************************************************/
/***************** Write menu with some institutional links ******************/
@@ -150,20 +158,6 @@ static void Lnk_WriteListOfLinks (void)
fprintf (Gbl.F.Out,"");
}
-/*****************************************************************************/
-/********************** Put a link (form) to edit links **********************/
-/*****************************************************************************/
-
-static void Lnk_PutFormToEditLinks (void)
- {
- extern const char *Txt_Edit;
-
- fprintf (Gbl.F.Out,"");
- }
-
/*****************************************************************************/
/************************** Put forms to edit links **************************/
/*****************************************************************************/
diff --git a/swad_place.c b/swad_place.c
index ad809517..9e50781b 100644
--- a/swad_place.c
+++ b/swad_place.c
@@ -59,7 +59,7 @@ extern struct Globals Gbl;
/*****************************************************************************/
static void Plc_GetParamPlcOrderType (void);
-static void Plc_PutIconToEdit (void);
+static void Plc_PutIconToEditPlaces (void);
static void Plc_ListPlacesForEdition (void);
static void Plc_PutParamPlcCod (long PlcCod);
static void Plc_RenamePlace (Cns_ShortOrFullName_t ShortOrFullName);
@@ -94,7 +94,7 @@ void Plc_SeePlaces (void)
/***** Table head *****/
Lay_StartRoundFrame (NULL,Txt_Places,
- Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM ? Plc_PutIconToEdit :
+ Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM ? Plc_PutIconToEditPlaces :
NULL);
fprintf (Gbl.F.Out,""
"");
@@ -198,7 +198,7 @@ static void Plc_GetParamPlcOrderType (void)
/********************** Put a link (form) to edit places *********************/
/*****************************************************************************/
-static void Plc_PutIconToEdit (void)
+static void Plc_PutIconToEditPlaces (void)
{
extern const char *Txt_Edit;