diff --git a/swad_changelog.h b/swad_changelog.h
index 545472303..73f0e614b 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -135,13 +135,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.199.8 (2016-04-18)"
+#define Log_PLATFORM_VERSION "SWAD 15.200 (2016-04-18)"
#define CSS_FILE "swad15.198.css"
#define JS_FILE "swad15.197.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.200: Apr 18, 2016 New layout of search form. (199718 lines)
Version 15.199.8: Apr 18, 2016 Changes in title of results of searching documents. (199723 lines)
Version 15.199.7: Apr 17, 2016 Changes in title of results of searching users. (199639 lines)
Version 15.199.6: Apr 17, 2016 Changes in title of results of searching courses. (199647 lines)
diff --git a/swad_file_browser.c b/swad_file_browser.c
index 61bc3c170..efb57573a 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -11136,8 +11136,8 @@ unsigned Brw_ListDocsFound (const char *Query,
extern const char *Txt_Course;
extern const char *Txt_File_zone;
extern const char *Txt_Document;
- extern const char *Txt_document_hidden;
- extern const char *Txt_DOCUM_hidden;
+ extern const char *Txt_hidden_document;
+ extern const char *Txt_hidden_documents;
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned NumDocs;
@@ -11203,9 +11203,9 @@ unsigned Brw_ListDocsFound (const char *Query,
"(");
NumDocsHidden = NumDocs - NumDocsNotHidden;
if (NumDocsHidden == 1)
- fprintf (Gbl.F.Out,"1 %s",Txt_document_hidden);
+ fprintf (Gbl.F.Out,"1 %s",Txt_hidden_document);
else
- fprintf (Gbl.F.Out,"%u %s",NumDocsHidden,Txt_DOCUM_hidden);
+ fprintf (Gbl.F.Out,"%u %s",NumDocsHidden,Txt_hidden_documents);
fprintf (Gbl.F.Out,")"
""
"");
diff --git a/swad_layout.c b/swad_layout.c
index 556e01e3a..b5e6a2916 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -809,7 +809,8 @@ static void Lay_WritePageTopHeading (void)
(Gbl.CurrentCty.Cty.CtyCod > 0 ? ActCtySch :
ActSysSch)))));
Sco_PutParamScope (Sco_SCOPE_SYS);
- Sch_PutFormToSearch ("search-white64x64.png","head_search_text");
+ Sch_PutInputStringToSearch ("head_search_text");
+ Sch_PutMagnifyingGlassButton ("search-white64x64.png");
Act_FormEnd ();
fprintf (Gbl.F.Out,""); // head_row_1_search
diff --git a/swad_search.c b/swad_search.c
index f80cd749b..a17264dd1 100644
--- a/swad_search.c
+++ b/swad_search.c
@@ -203,29 +203,30 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Scope;
- extern const char *Txt_All;
- extern const char *Txt_Institutions;
- extern const char *Txt_Centres;
- extern const char *Txt_Degrees;
- extern const char *Txt_Courses;
- extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
- extern const char *Txt_My_documents;
- extern const char *Txt_Documents_in_my_courses;
- extern const char *Txt_Open_documents;
+ extern const char *Txt_SEARCH_X_in_Y;
+ extern const char *Txt_all;
+ extern const char *Txt_institutions;
+ extern const char *Txt_centres;
+ extern const char *Txt_degrees;
+ extern const char *Txt_courses;
+ extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
+ extern const char *Txt_my_documents;
+ extern const char *Txt_documents_in_my_courses;
+ extern const char *Txt_open_documents;
extern const char *Txt_Search;
const char *Titles[Sch_NUM_WHAT_TO_SEARCH] =
{
- Txt_All, // Sch_SEARCH_ALL
- Txt_Institutions, // Sch_SEARCH_INSTITUTIONS
- Txt_Centres, // Sch_SEARCH_CENTRES
- Txt_Degrees, // Sch_SEARCH_DEGREES
- Txt_Courses, // Sch_SEARCH_COURSES
- Txt_ROLES_PLURAL_Abc[Rol_TEACHER][Usr_SEX_UNKNOWN], // Sch_SEARCH_TEACHERS
- Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN], // Sch_SEARCH_STUDENTS
- Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN], // Sch_SEARCH_GUESTS
- Txt_Open_documents, // Sch_SEARCH_OPEN_DOCUMENTS
- Txt_Documents_in_my_courses, // Sch_SEARCH_DOCUM_IN_MY_COURSES
- Txt_My_documents, // Sch_SEARCH_MY_DOCUMENTS
+ Txt_all, // Sch_SEARCH_ALL
+ Txt_institutions, // Sch_SEARCH_INSTITUTIONS
+ Txt_centres, // Sch_SEARCH_CENTRES
+ Txt_degrees, // Sch_SEARCH_DEGREES
+ Txt_courses, // Sch_SEARCH_COURSES
+ Txt_ROLES_PLURAL_abc[Rol_TEACHER][Usr_SEX_UNKNOWN], // Sch_SEARCH_TEACHERS
+ Txt_ROLES_PLURAL_abc[Rol_STUDENT][Usr_SEX_UNKNOWN], // Sch_SEARCH_STUDENTS
+ Txt_ROLES_PLURAL_abc[Rol__GUEST_][Usr_SEX_UNKNOWN], // Sch_SEARCH_GUESTS
+ Txt_open_documents, // Sch_SEARCH_OPEN_DOCUMENTS
+ Txt_documents_in_my_courses, // Sch_SEARCH_DOCUM_IN_MY_COURSES
+ Txt_my_documents, // Sch_SEARCH_MY_DOCUMENTS
};
Sch_WhatToSearch_t WhatToSearch;
@@ -249,7 +250,12 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco
Sco_PutSelectorScope (false);
fprintf (Gbl.F.Out,"");
+ /***** String to find *****/
+ Sch_PutInputStringToSearch (NULL);
+
/***** What to search? *****/
+ fprintf (Gbl.F.Out," %s ",
+ The_ClassForm[Gbl.Prefs.Theme],Txt_SEARCH_X_in_Y);
fprintf (Gbl.F.Out,"");
- /***** String to find *****/
- Sch_PutFormToSearch ("search64x64.png",NULL);
+ /***** Magnifying glass icon *****/
+ Sch_PutMagnifyingGlassButton ("search64x64.png");
/***** Send button and end frame *****/
Lay_EndRoundFrameWithButton (Lay_CONFIRM_BUTTON,Txt_Search);
@@ -301,10 +307,10 @@ static bool Sch_CheckIfIHavePermissionToSearch (Sch_WhatToSearch_t WhatToSearch)
}
/*****************************************************************************/
-/*********** Put form to search courses, teachers, documents... **************/
+/********************* Put string to search inside form **********************/
/*****************************************************************************/
-void Sch_PutFormToSearch (const char *Icon,const char *IdInputText)
+void Sch_PutInputStringToSearch (const char *IdInputText)
{
extern const char *Txt_Search;
@@ -320,6 +326,15 @@ void Sch_PutFormToSearch (const char *Icon,const char *IdInputText)
fprintf (Gbl.F.Out," placeholder=\"%s…\"",
Txt_Search);
fprintf (Gbl.F.Out," style=\"margin:0;\" />");
+ }
+
+/*****************************************************************************/
+/******************* Put magnifying glass button inside form *****************/
+/*****************************************************************************/
+
+void Sch_PutMagnifyingGlassButton (const char *Icon)
+ {
+ extern const char *Txt_Search;
/***** Send button *****/
fprintf (Gbl.F.Out,"