diff --git a/css/swad_desktop.css b/css/swad_desktop.css index ccebdda8..a9c9ff90 100644 --- a/css/swad_desktop.css +++ b/css/swad_desktop.css @@ -266,6 +266,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} } .INS_LNK { + padding:1px; font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif; font-size:9pt; color:#4D88A1; @@ -777,6 +778,24 @@ a:hover img.CENTRE_PHOTO_SHOW font-size:8pt; } +/*********************************** Lists ***********************************/ +.LIST_LEFT + { + list-style-type:none; + padding:0; + margin:0; + text-align:left; + vertical-align:middle; + } +.LIST_CENTER + { + list-style-type:none; + padding:0; + margin:0; + text-align:center; + vertical-align:middle; + } + /*****************************************************************************/ .FILENAME {color:#404040; font-size:14pt; font-weight:bold;} diff --git a/css/swad_mobile.css b/css/swad_mobile.css index 9dc0b138..122e7751 100644 --- a/css/swad_mobile.css +++ b/css/swad_mobile.css @@ -213,6 +213,7 @@ form {margin:0; display:inline;} } .INS_LNK { + padding:1px; font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif; font-size:9pt; color:#4D88A1; @@ -588,6 +589,24 @@ a:hover img.CENTRE_PHOTO_SHOW font-size:10pt; } +/*********************************** Lists ***********************************/ +.LIST_LEFT + { + list-style-type:none; + padding:0; + margin:0; + text-align:left; + vertical-align:middle; + } +.LIST_CENTER + { + list-style-type:none; + padding:0; + margin:0; + text-align:center; + vertical-align:middle; + } + /*****************************************************************************/ .FILENAME {color:#404040; font-size:18pt; font-weight:bold;} diff --git a/swad_action.c b/swad_action.c index 805d771b..95cd049c 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4772,9 +4772,7 @@ void Act_WriteSmallMFUActions (struct Act_ListMFUActions *ListMFUActions) Act_FormEnd (); fprintf (Gbl.F.Out,"
" - "
"); Act_FormEnd (); } diff --git a/swad_group.c b/swad_group.c index e192e5f5..e7d46470 100644 --- a/swad_group.c +++ b/swad_group.c @@ -4188,8 +4188,8 @@ void Grp_ShowSelectorWhichGrps (void) extern const char *Txt_Show_WHICH_groups[2]; Grp_WhichGroups_t WhichGrps; - fprintf (Gbl.F.Out,"" + ""); } /*****************************************************************************/ diff --git a/swad_link.c b/swad_link.c index 05195672..78cf0d36 100644 --- a/swad_link.c +++ b/swad_link.c @@ -58,6 +58,8 @@ extern struct Globals Gbl; /***************************** Private prototypes ****************************/ /*****************************************************************************/ +static void Lnk_WriteListOfLinks (void); + static void Lnk_PutFormToEditLinks (void); static void Lnk_ListLinksForEdition (void); static void Lnk_PutParamLnkCod (long LnkCod); @@ -74,7 +76,6 @@ static void Lnk_CreateLink (struct Link *Lnk); void Lnk_SeeLinks (void) { extern const char *Txt_Links; - unsigned NumLnk; /***** Get list of links *****/ Lnk_GetListLinks (); @@ -83,35 +84,75 @@ void Lnk_SeeLinks (void) if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) Lnk_PutFormToEditLinks (); - /***** Table head *****/ + /***** Write all the links *****/ if (Gbl.Links.Num) { - Lay_StartRoundFrameTable (NULL,2,Txt_Links); - - /***** Write all the links *****/ - for (NumLnk = 0; - NumLnk < Gbl.Links.Num; - NumLnk++) - /* Write data of this link */ - fprintf (Gbl.F.Out,"" - "" - "" - "%s" - "" - "" - "", - Gbl.Links.Lst[NumLnk].WWW, - Gbl.Links.Lst[NumLnk].FullName, - Gbl.Links.Lst[NumLnk].ShortName); - - /***** Table end *****/ - Lay_EndRoundFrameTable (); + Lay_StartRoundFrame (NULL,Txt_Links); + Lnk_WriteListOfLinks (); + Lay_EndRoundFrame (); } /***** Free list of links *****/ Lnk_FreeListLinks (); } + +/*****************************************************************************/ +/***************** Write menu with some institutional links ******************/ +/*****************************************************************************/ + +void Lnk_WriteMenuWithInstitutionalLinks (void) + { + /***** Get list of links *****/ + Lnk_GetListLinks (); + + /***** Write all the links *****/ + if (Gbl.Links.Num) + { + fprintf (Gbl.F.Out,"" + "" + "
"); + Lnk_WriteListOfLinks (); + fprintf (Gbl.F.Out,"
" + "" + ""); + } + + /***** Free list of links *****/ + Lnk_FreeListLinks (); + } + +/*****************************************************************************/ +/*************************** Write list of links *****************************/ +/*****************************************************************************/ + +static void Lnk_WriteListOfLinks (void) + { + unsigned NumLnk; + + /***** List start *****/ + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /********************** Put a link (form) to edit links **********************/ /*****************************************************************************/ @@ -721,50 +762,3 @@ static void Lnk_CreateLink (struct Link *Lnk) Lnk->ShortName); Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); } - -/*****************************************************************************/ -/***************** Write menu with some institutional links ******************/ -/*****************************************************************************/ - -void Lnk_WriteMenuWithInstitutionalLinks (void) - { - unsigned NumLnk; - - /***** Get list of links *****/ - Lnk_GetListLinks (); - - if (Gbl.Links.Num) - { - /***** Header *****/ - fprintf (Gbl.F.Out,"" - "" - "
" - ""); - - /***** Write all the links *****/ - for (NumLnk = 0; - NumLnk < Gbl.Links.Num; - NumLnk++) - /* Write data of this link */ - fprintf (Gbl.F.Out,"" - "" - "", - Gbl.Links.Lst[NumLnk].WWW, - Gbl.Links.Lst[NumLnk].FullName, - Gbl.Links.Lst[NumLnk].ShortName); - - /***** End table *****/ - fprintf (Gbl.F.Out,"
" - "" - "%s" - "" - "
" - "
" - "" - ""); - } - - /***** Free list of links *****/ - Lnk_FreeListLinks (); - } diff --git a/swad_link.h b/swad_link.h index 4de918f0..814cc773 100644 --- a/swad_link.h +++ b/swad_link.h @@ -47,6 +47,8 @@ struct Link /*****************************************************************************/ void Lnk_SeeLinks (void); +void Lnk_WriteMenuWithInstitutionalLinks (void); + void Lnk_EditLinks (void); void Lnk_GetListLinks (void); void Lnk_FreeListLinks (void); @@ -57,6 +59,5 @@ void Lnk_RenameLinkShort (void); void Lnk_RenameLinkFull (void); void Lnk_ChangeLinkWWW (void); void Lnk_RecFormNewLink (void); -void Lnk_WriteMenuWithInstitutionalLinks (void); #endif diff --git a/swad_role.c b/swad_role.c index 60bc7f5c..3d35eaec 100644 --- a/swad_role.c +++ b/swad_role.c @@ -399,8 +399,8 @@ void Rol_PutAllRolesRegRemUsrsCrs (void) extern const char *The_ClassFormul[The_NUM_THEMES]; /***** Students or teachers *****/ - fprintf (Gbl.F.Out,"
" - "