diff --git a/Makefile b/Makefile index d5f09f17..e4e29b64 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ OBJS = swad_account.o swad_action.o swad_announcement.o swad_assignment.o swad_a swad_QR.o \ swad_record.o swad_role.o swad_RSS.o \ swad_scope.o swad_search.o swad_session.o swad_setup.o swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \ - swad_test.o swad_test_import.o swad_theme.o swad_timetable.o \ + swad_tab.o swad_test.o swad_test_import.o swad_theme.o swad_timetable.o \ swad_user.o \ swad_web_service.o \ swad_xml.o \ diff --git a/swad_action.c b/swad_action.c index 1fe31e52..b5c8ac08 100644 --- a/swad_action.c +++ b/swad_action.c @@ -59,6 +59,7 @@ #include "swad_QR.h" #include "swad_search.h" #include "swad_setup.h" +#include "swad_tab.h" #include "swad_test_import.h" #include "swad_zip.h" @@ -1050,7 +1051,7 @@ Profile: 904. ActDowBrf Download a file in the briefcase */ -const struct Act_Menu Act_Menu[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = +const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = { // TabUnk ********** { @@ -3550,7 +3551,7 @@ bool Act_CheckIfIHavePermissionToExecuteAction (Act_Action_t Action) const char *Act_GetTitleAction (Act_Action_t Action) { - extern const char *Txt_MENU_TITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; + extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; if (Action < 0 || Action >= Act_NUM_ACTIONS) return NULL; @@ -3563,7 +3564,7 @@ const char *Act_GetTitleAction (Act_Action_t Action) const char *Act_GetSubtitleAction (Act_Action_t Action) { - extern const char *Txt_MENU_SUBTITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; + extern const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; if (Action < 0 || Action >= Act_NUM_ACTIONS) return NULL; @@ -3576,8 +3577,8 @@ const char *Act_GetSubtitleAction (Act_Action_t Action) void Act_GetBreadcrumbStrForAction (Act_Action_t Action,bool HTML,char *BreadcrumbStr) { - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; - extern const char *Txt_MENU_TITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; + extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS]; + extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; Act_Action_t Superaction = Act_Actions[Action].SuperAction; char *Arrow; @@ -3732,7 +3733,7 @@ void Act_AdjustActionWhenNoUsrLogged (void) Gbl.CurrentAct = ActSeeCtyInf; else Gbl.CurrentAct = Cfg_DEFAULT_ACTION_WHEN_NO_USR_LOGGED; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); } /*****************************************************************************/ @@ -3763,7 +3764,7 @@ void Act_AdjustCurrentAction (void) break; default: Gbl.CurrentAct = ActFrmChgMyPwd; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } } @@ -3773,7 +3774,7 @@ void Act_AdjustCurrentAction (void) if (!Pwd_FastCheckIfPasswordSeemsGood (Gbl.Usrs.Me.LoginPlainPassword)) { Gbl.CurrentAct = ActFrmChgMyPwd; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } @@ -3790,7 +3791,7 @@ void Act_AdjustCurrentAction (void) break; default: Gbl.CurrentAct = ActFrmUsrAcc; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } } @@ -3808,7 +3809,7 @@ void Act_AdjustCurrentAction (void) break; default: Gbl.CurrentAct = ActReqEdiRecCom; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } @@ -3825,7 +3826,7 @@ void Act_AdjustCurrentAction (void) break; default: Gbl.CurrentAct = ActReqEdiMyIns; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } @@ -3837,7 +3838,7 @@ void Act_AdjustCurrentAction (void) if (!Gbl.Usrs.Me.UsrDat.Accepted && Gbl.CurrentAct != ActLogOut) { Gbl.CurrentAct = ActReqAccEnrCrs; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } @@ -3870,7 +3871,7 @@ void Act_AdjustCurrentAction (void) if (Grp_NumGrpTypesMandatIDontBelong ()) // To do: if this query is too slow ==> put it only when login. { Gbl.CurrentAct = ActReqSelGrp; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } @@ -3884,7 +3885,7 @@ void Act_AdjustCurrentAction (void) /* If limit of clicks has been reached, the only action possible is show a form to send my photo */ Gbl.CurrentAct = ActReqMyPho; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } break; @@ -3902,7 +3903,7 @@ void Act_AdjustCurrentAction (void) if (Tst_CheckIfCourseHaveTestsAndPluggableIsUnknown ()) { Gbl.CurrentAct = ActCfgTst; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); return; } break; @@ -4068,8 +4069,8 @@ void Act_WriteBigMFUActions (struct Act_ListMFUActions *ListMFUActions) { extern const char *The_ClassFormulNB[The_NUM_THEMES]; extern const char *Txt_Frequent_actions; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; - extern const char *Txt_MENU_TITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; + extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS]; + extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; unsigned NumAct; Act_Action_t Action; const char *Title; @@ -4120,7 +4121,7 @@ void Act_WriteBigMFUActions (struct Act_ListMFUActions *ListMFUActions) void Act_WriteSmallMFUActions (struct Act_ListMFUActions *ListMFUActions) { extern const char *Txt_Frequent_actions; - extern const char *Txt_MENU_TITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; + extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; unsigned NumAct; Act_Action_t Action; const char *Title; diff --git a/swad_action.h b/swad_action.h index a3544672..87c804a4 100644 --- a/swad_action.h +++ b/swad_action.h @@ -69,8 +69,6 @@ typedef enum typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -/* Related with tabs, menus, etc. */ -#define Act_NUM_TABS (1+11) #define Act_NUM_ACTIONS (7+52+15+39+22+17+204+184+94+168+28+75) #define Act_MAX_ACTION_COD 1243 diff --git a/swad_changelog.h b/swad_changelog.h index 066af90b..a9570bc2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -35,11 +35,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.53.1 (2015/01/04)" +#define Log_PLATFORM_VERSION "SWAD 14.54 (2015/01/04)" // 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 | tail -1 /* + Version 14.54 :Jan 04, 2014 New module swad_tab for drawing tabs. (173341 lines) + 1 change necessary in Makefile: +Add swad_tab.o to list of object files + Version 14.53.1 :Jan 04, 2014 Some functions moved from swad_layout to swad_menu. (173256 lines) Version 14.53 :Jan 04, 2014 New module swad_calendar for drawing months and calendar. (173254 lines) 1 change necessary in Makefile: diff --git a/swad_course.c b/swad_course.c index be43c812..94d91543 100644 --- a/swad_course.c +++ b/swad_course.c @@ -43,6 +43,7 @@ #include "swad_parameter.h" #include "swad_QR.h" #include "swad_RSS.h" +#include "swad_tab.h" #include "swad_theme.h" /*****************************************************************************/ @@ -133,8 +134,8 @@ static void Crs_Configuration (bool PrintView) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_This_course_fulfills_X_out_of_Y_indicators_; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; - extern const char *Txt_MENU_TITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; + extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS]; + extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB]; extern const char *Txt_Show_more_details; extern const char *Txt_NO; extern const char *Txt_Course; @@ -539,7 +540,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_My_courses; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; + extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS]; extern const char *Txt_Go_to_X; struct Country Cty; struct Institution Ins; diff --git a/swad_degree.c b/swad_degree.c index 2ee6dfba..15c895ca 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -46,8 +46,9 @@ #include "swad_QR.h" #include "swad_RSS.h" #include "swad_string.h" -#include "swad_theme.h" +#include "swad_tab.h" #include "swad_text.h" +#include "swad_theme.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -627,7 +628,7 @@ static void Deg_WriteSelectorOfDegree (Act_Action_t NextAction) void Deg_WriteCtyInsCtrDeg (void) { extern const char *The_ClassDegree[The_NUM_THEMES]; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; + extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS]; char DegreeShortName[Deg_MAX_LENGTH_DEGREE_FULL_NAME+1]; // Full name of degree /***** Form to go to the system *****/ diff --git a/swad_layout.c b/swad_layout.c index 78b2004e..ccf2e292 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -40,6 +40,7 @@ #include "swad_notification.h" #include "swad_parameter.h" #include "swad_preference.h" +#include "swad_tab.h" #include "swad_theme.h" #include "swad_web_service.h" @@ -61,25 +62,9 @@ const char *Lay_LayoutIcons[Lay_NUM_LAYOUTS] = }; /*****************************************************************************/ -/****************************** Private constants ****************************/ +/***************************** Private constants *****************************/ /*****************************************************************************/ -const char *Lay_TabIcons[Act_NUM_TABS] = - { - /* TabUnk */ NULL, - /* TabSys */ "sys", - /* TabCty */ "cty", - /* TabIns */ "ins", - /* TabCtr */ "ctr", - /* TabDeg */ "deg", - /* TabCrs */ "crs", - /* TabAss */ "ass", - /* TabUsr */ "usr", - /* TabMsg */ "msg", - /* TabSta */ "sta", - /* TabPrf */ "prf", - }; - /*****************************************************************************/ /******************************* Private types *******************************/ /*****************************************************************************/ @@ -103,15 +88,7 @@ static void Lay_WriteScriptConnectedUsrs (void); static void Lay_WriteScriptCustomDropzone (void); static void Lay_WritePageTopHeading (void); -static void Lay_DrawTabs (void); -static void Lay_DrawTabsDeskTop (void); -static void Lay_DrawTabsMobile (void); -static bool Lay_CheckIfICanViewTab (Act_Tab_t Tab); -static void Lay_DrawBreadcrumb (void); -static void Lay_WriteBreadcrumbHome (void); -static void Lay_WriteBreadcrumbTab (void); -static void Lay_WriteBreadcrumbAction (void); static void Lay_WriteTitleAction (void); static void Lay_ShowLeftColumn (void); @@ -313,7 +290,7 @@ void Lay_WriteStartOfPage (void) if (Gbl.CurrentAct == ActMnu) Mnu_WriteMenuThisTabMobile (); else - Lay_DrawTabsMobile (); + Tab_DrawTabsMobile (); } break; default: @@ -730,7 +707,7 @@ static void Lay_WritePageTopHeading (void) Gbl.Prefs.PathTheme); /***** 3rd. row, 2nd. column *****/ - Lay_DrawTabs (); + Tab_DrawTabs (); /***** 3rd. row, 3rd. column *****/ if (Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN) // Right column visible @@ -754,7 +731,7 @@ static void Lay_WritePageTopHeading (void) } break; case Lay_LAYOUT_MOBILE: - Lay_DrawTabs (); + Tab_DrawTabs (); fprintf (Gbl.F.Out,"" ""); break; @@ -763,414 +740,6 @@ static void Lay_WritePageTopHeading (void) } } -/*****************************************************************************/ -/*************** Set current tab depending on current action *****************/ -/*****************************************************************************/ - -void Lay_SetCurrentTab (void) - { - Gbl.CurrentTab = Act_Actions[Gbl.CurrentAct].Tab; - - /***** Change action and tab if country, institution, centre or degree - are incompatible with the current tab *****/ - switch (Gbl.CurrentTab) - { - case TabCty: - if (Gbl.CurrentCty.Cty.CtyCod <= 0) // No country selected - Gbl.CurrentAct = ActSeeCty; - break; - case TabIns: - if (Gbl.CurrentIns.Ins.InsCod <= 0) // No institution selected - { - if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected, but no institution selected - Gbl.CurrentAct = ActSeeIns; - else // No country selected - Gbl.CurrentAct = ActSeeCty; - } - break; - case TabCtr: - if (Gbl.CurrentCtr.Ctr.CtrCod <= 0) // No centre selected - { - if (Gbl.CurrentIns.Ins.InsCod > 0) // Institution selected, but no centre selected - Gbl.CurrentAct = ActSeeCtr; - else if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected, but no institution selected - Gbl.CurrentAct = ActSeeIns; - else // No country selected - Gbl.CurrentAct = ActSeeCty; - } - break; - case TabDeg: - if (Gbl.CurrentDeg.Deg.DegCod <= 0) // No degree selected - { - if (Gbl.CurrentCtr.Ctr.CtrCod > 0) // Centre selected, but no degree selected - Gbl.CurrentAct = ActSeeDeg; - else if (Gbl.CurrentIns.Ins.InsCod > 0) // Institution selected, but no centre selected - Gbl.CurrentAct = ActSeeCtr; - else if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected, but no institution selected - Gbl.CurrentAct = ActSeeIns; - else // No country selected - Gbl.CurrentAct = ActSeeCty; - } - break; - default: - break; - } - Gbl.CurrentTab = Act_Actions[Gbl.CurrentAct].Tab; - - Lay_DisableIncompatibleTabs (); - } - -/*****************************************************************************/ -/************************** Disable incompatible tabs ************************/ -/*****************************************************************************/ - -void Lay_DisableIncompatibleTabs (void) - { - /***** Set country, institution, centre, degree and course depending on the current tab. - This will disable tabs incompatible with the current one. *****/ - switch (Gbl.CurrentTab) - { - case TabSys: - Gbl.CurrentCty.Cty.CtyCod = -1L; - // no break - case TabCty: - Gbl.CurrentIns.Ins.InsCod = -1L; - // no break - case TabIns: - Gbl.CurrentCtr.Ctr.CtrCod = -1L; - // no break - case TabCtr: - Gbl.CurrentDeg.Deg.DegCod = -1L; - // no break - case TabDeg: - Gbl.CurrentCrs.Crs.CrsCod = -1L; - break; - default: - break; - } - } - -/*****************************************************************************/ -/**************** Draw tabs with the current tab highlighted *****************/ -/*****************************************************************************/ - -static void Lay_DrawTabs (void) - { - unsigned ColspanCentralPart = 3; - - if (Gbl.Prefs.Layout == Lay_LAYOUT_DESKTOP) - { - if (Gbl.Prefs.SideCols == Lay_SHOW_BOTH_COLUMNS) // 11: both side columns visible, left and right - ColspanCentralPart = 1; - else if (Gbl.Prefs.SideCols != Lay_HIDE_BOTH_COLUMNS) // 10 or 01: only one side column visible, left or right - ColspanCentralPart = 2; - } - fprintf (Gbl.F.Out,"" - "
", - ColspanCentralPart,Gbl.Prefs.PathTheme); - switch (Gbl.Prefs.Layout) - { - case Lay_LAYOUT_DESKTOP: - Lay_DrawTabsDeskTop (); - break; - case Lay_LAYOUT_MOBILE: - Lay_DrawBreadcrumb (); - break; - default: - break; - } - fprintf (Gbl.F.Out,"
" - ""); - } - -/*****************************************************************************/ -/**************** Draw tabs with the current tab highlighted *****************/ -/*****************************************************************************/ - -static void Lay_DrawTabsDeskTop (void) - { - extern const char *The_ClassTabOn[The_NUM_THEMES]; - extern const char *The_ClassTabOff[The_NUM_THEMES]; - extern const char *The_TabOnBgColors[The_NUM_THEMES]; - extern const char *The_TabOffBgColors[The_NUM_THEMES]; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; - extern const char *Txt_TABS_SHORT_TXT[Act_NUM_TABS]; - Act_Tab_t NumTab; - bool ICanViewTab; - - /***** Table start *****/ - fprintf (Gbl.F.Out,""); - } - -/*****************************************************************************/ -/************************ Draw vertical menu with tabs ***********************/ -/*****************************************************************************/ - -static void Lay_DrawTabsMobile (void) - { - extern const char *The_ClassMenuOff[The_NUM_THEMES]; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; - unsigned NumTabVisible; - Act_Tab_t NumTab; - bool ICanViewTab; - - /***** Table start *****/ - fprintf (Gbl.F.Out,""); - - /***** Loop to write all tabs. Each row holds a tab *****/ - for (NumTabVisible = 0, NumTab = (Act_Tab_t) 1; - NumTab <= (Act_Tab_t) Act_NUM_TABS - 1; - NumTab++) - { - ICanViewTab = Lay_CheckIfICanViewTab (NumTab); - - if (ICanViewTab || NumTab > TabCrs) // Don't show the first hidden tabs - { - if (NumTabVisible % Cfg_LAYOUT_MOBILE_NUM_COLUMNS == 0) - fprintf (Gbl.F.Out,""); - - /* Icon at top and text at bottom */ - fprintf (Gbl.F.Out,""); - if ((NumTabVisible % Cfg_LAYOUT_MOBILE_NUM_COLUMNS) == (Cfg_LAYOUT_MOBILE_NUM_COLUMNS-1)) - fprintf (Gbl.F.Out,""); - - NumTabVisible++; - } - } - - /***** End of the table *****/ - fprintf (Gbl.F.Out,"
"); - if (ICanViewTab) - { - fprintf (Gbl.F.Out,"
"); - Act_FormStart (ActMnu); - Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) NumTab); - Act_LinkFormSubmit (Txt_TABS_FULL_TXT[NumTab],The_ClassMenuOff[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"" - "
%s
" - "" - "" - "
", - Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION_64x64, - Lay_TabIcons[NumTab], - Txt_TABS_FULL_TXT[NumTab], - Txt_TABS_FULL_TXT[NumTab], - Txt_TABS_FULL_TXT[NumTab]); - } - else - fprintf (Gbl.F.Out,"
" - "\"%s\"" - "
%s
" - "
", - Gbl.Prefs.PathIconSet, - Cfg_ICON_ACTION_64x64, - Lay_TabIcons[NumTab], - Txt_TABS_FULL_TXT[NumTab], - Txt_TABS_FULL_TXT[NumTab], - The_ClassMenuOff[Gbl.Prefs.Theme], - Txt_TABS_FULL_TXT[NumTab]); - fprintf (Gbl.F.Out,"
"); - } - -/*****************************************************************************/ -/************************* Check if I can view a tab *************************/ -/*****************************************************************************/ - -static bool Lay_CheckIfICanViewTab (Act_Tab_t Tab) - { - switch (Tab) - { - case TabUnk: - return false; - case TabSys: - return (Gbl.CurrentCty.Cty.CtyCod <= 0); - case TabCty: - return (Gbl.CurrentCty.Cty.CtyCod > 0 && - Gbl.CurrentIns.Ins.InsCod <= 0); - case TabIns: - return (Gbl.CurrentIns.Ins.InsCod > 0 && - Gbl.CurrentCtr.Ctr.CtrCod <= 0); - case TabCtr: - return (Gbl.CurrentCtr.Ctr.CtrCod > 0 && - Gbl.CurrentDeg.Deg.DegCod <= 0); - case TabDeg: - return (Gbl.CurrentDeg.Deg.DegCod > 0 && - Gbl.CurrentCrs.Crs.CrsCod <= 0); - case TabCrs: - case TabAss: - return (Gbl.CurrentCrs.Crs.CrsCod > 0); - case TabMsg: - return (Gbl.Usrs.Me.Logged || - Gbl.CurrentCrs.Crs.CrsCod > 0); - default: - return true; - } - } - -/*****************************************************************************/ -/********************* Draw breadcrumb with tab and action *******************/ -/*****************************************************************************/ - -static void Lay_DrawBreadcrumb (void) - { - extern const char *The_TabOnBgColors[The_NUM_THEMES]; - extern const char *The_ClassTabOn[The_NUM_THEMES]; - - fprintf (Gbl.F.Out,"
", - The_TabOnBgColors[Gbl.Prefs.Theme]); - - /***** Home *****/ - Lay_WriteBreadcrumbHome (); - - if (Gbl.CurrentAct == ActMnu || - Act_Actions[Act_Actions[Gbl.CurrentAct].SuperAction].IndexInMenu >= 0) - { - /***** Tab *****/ - fprintf (Gbl.F.Out," > ", - The_ClassTabOn[Gbl.Prefs.Theme]); - Lay_WriteBreadcrumbTab (); - - if (Act_Actions[Act_Actions[Gbl.CurrentAct].SuperAction].IndexInMenu >= 0) - { - /***** Menu *****/ - fprintf (Gbl.F.Out," > ", - The_ClassTabOn[Gbl.Prefs.Theme]); - Lay_WriteBreadcrumbAction (); - } - } - - fprintf (Gbl.F.Out,"
"); - } - -/*****************************************************************************/ -/************************ Write home in breadcrumb ***************************/ -/*****************************************************************************/ - -static void Lay_WriteBreadcrumbHome (void) - { - extern const char *The_ClassTabOn[The_NUM_THEMES]; - extern const char *Txt_Home_PAGE; - - Act_FormStart (ActHom); - Act_LinkFormSubmit (Txt_Home_PAGE,The_ClassTabOn[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s" - "", - Txt_Home_PAGE); - } - -/*****************************************************************************/ -/************ Write icon and title associated to the current tab *************/ -/*****************************************************************************/ - -static void Lay_WriteBreadcrumbTab (void) - { - extern const char *The_ClassTabOn[The_NUM_THEMES]; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; - - /***** Start form *****/ - Act_FormStart (ActMnu); - Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) Gbl.CurrentTab); - Act_LinkFormSubmit (Txt_TABS_FULL_TXT[Gbl.CurrentTab],The_ClassTabOn[Gbl.Prefs.Theme]); - - /***** Title and end of form *****/ - fprintf (Gbl.F.Out,"%s" - "", - Txt_TABS_FULL_TXT[Gbl.CurrentTab]); - } - -/*****************************************************************************/ -/***************** Write title associated to the current action **************/ -/*****************************************************************************/ - -static void Lay_WriteBreadcrumbAction (void) - { - extern const char *The_ClassTabOn[The_NUM_THEMES]; - const char *Title = Act_GetTitleAction (Gbl.CurrentAct); - - /***** Start form *****/ - Act_FormStart (Act_Actions[Gbl.CurrentAct].SuperAction); - Act_LinkFormSubmit (Title,The_ClassTabOn[Gbl.Prefs.Theme]); - - /***** Title and end of form *****/ - fprintf (Gbl.F.Out,"%s" - "", - Title); - } - /*****************************************************************************/ /*********** Write icon and title associated to the current action ***********/ /*****************************************************************************/ @@ -1179,7 +748,7 @@ static void Lay_WriteTitleAction (void) { extern const char *The_ClassTitleAction[The_NUM_THEMES]; extern const char *The_ClassSubtitleAction[The_NUM_THEMES]; - extern const char *Txt_TABS_FULL_TXT[Act_NUM_TABS]; + extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS]; /***** Container start *****/ fprintf (Gbl.F.Out,"
= 1 || UnsignedNum <= Act_NUM_TABS) + if (UnsignedNum >= 1 || UnsignedNum <= Tab_NUM_TABS) Gbl.Usrs.Me.UsrLast.LastTab = (Act_Tab_t) UnsignedNum; /* Get last access to notifications */ @@ -1698,7 +1699,7 @@ void Usr_ChkUsrAndGetUsrData (void) if (Gbl.CurrentAct != ActRefCon) { Gbl.CurrentAct = ActLogOut; - Lay_SetCurrentTab (); + Tab_SetCurrentTab (); Lay_ShowAlert (Lay_WARNING,Txt_The_session_has_expired_due_to_inactivity); PutFormLogin = true; } @@ -1800,7 +1801,7 @@ void Usr_ChkUsrAndGetUsrData (void) Gbl.CurrentTab = ((Gbl.Usrs.Me.UsrLast.LastTab == TabCrs) && (Gbl.CurrentCrs.Crs.CrsCod <= 0)) ? TabSys : Gbl.Usrs.Me.UsrLast.LastTab; - Lay_DisableIncompatibleTabs (); + Tab_DisableIncompatibleTabs (); } Usr_UpdateMyLastData (); Crs_UpdateCrsLast ();