diff --git a/css/swad_desktop.css b/css/swad_desktop.css
index d1ba3bc4c..b5986e851 100644
--- a/css/swad_desktop.css
+++ b/css/swad_desktop.css
@@ -305,16 +305,25 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
/********************************** Notice ***********************************/
-.NOTICE_CONTAINER
+.NOTICE_CONTAINER_ACTIVE
{
margin:10px auto;
padding:10px;
- background-image:linear-gradient(#EED86C 0%,#FEED95 15%,#FAF098 100%);
+ background-image:linear-gradient(rgba(238,216,108,0.8) 0%,rgba(248,237,149,0.8) 15%,rgba(250,240,152,0.8) 100%);
box-shadow:0 8px 10px -5px rgba(125,113,0,0.8);
text-align:left;
overflow:hidden;
}
-.NOTICE_DATE
+.NOTICE_CONTAINER_OBSOLETE
+ {
+ margin:10px auto;
+ padding:10px;
+ background-image:linear-gradient(rgba(238,216,108,0.4) 0%,rgba(248,237,149,0.4) 15%,rgba(250,240,152,0.4) 100%);
+ box-shadow:0 8px 10px -5px rgba(125,113,0,0.4);
+ text-align:left;
+ overflow:hidden;
+ }
+.NOTICE_DATE_ACTIVE
{
float:right;
font-size:12pt;
@@ -323,7 +332,16 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
overflow:hidden;
display:inline-block;
}
-.NOTICE_SUBJECT
+.NOTICE_DATE_OBSOLETE
+ {
+ float:right;
+ font-size:12pt;
+ color:#808080;
+ text-align:right;
+ overflow:hidden;
+ display:inline-block;
+ }
+.NOTICE_SUBJECT_ACTIVE
{
margin:12px auto;
font-size:15pt;
@@ -332,17 +350,31 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
text-align:center;
overflow:hidden;
}
-.NOTICE_TEXT
+.NOTICE_TEXT_ACTIVE
{
clear:both;
font-size:12pt;
- color:#000080;
+ color:#204080;
overflow:hidden;
}
-.NOTICE_AUTHOR
+.NOTICE_TEXT_OBSOLETE
{
+ clear:both;
font-size:12pt;
+ color:#4070A0;
+ overflow:hidden;
+ }
+.NOTICE_AUTHOR_ACTIVE
+ {
color:#404040;
+ font-size:12pt;
+ text-align:right;
+ overflow:hidden;
+ }
+.NOTICE_AUTHOR_OBSOLETE
+ {
+ color:#808080;
+ font-size:12pt;
text-align:right;
overflow:hidden;
}
@@ -425,8 +457,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
.CONTEXT_OPT
{
display:inline;
- margin-left:9px;
- margin-right:9px;
+ margin-left:6px;
+ margin-right:6px;
}
/********************************* Frame 10 **********************************/
diff --git a/css/swad_mobile.css b/css/swad_mobile.css
index 8e545257c..23047b79a 100644
--- a/css/swad_mobile.css
+++ b/css/swad_mobile.css
@@ -257,42 +257,77 @@ form {margin:0; display:inline;}
}
/********************************** Notice ***********************************/
-.NOTICE_CONTAINER
+.NOTICE_CONTAINER_ACTIVE
{
margin:10px auto;
padding:10px;
- background-image:linear-gradient(#EED86C 0%,#FEED95 15%,#FAF098 100%);
+ background-image:linear-gradient(rgba(238,216,108,0.8) 0%,rgba(248,237,149,0.8) 15%,rgba(250,240,152,0.8) 100%);
box-shadow:0 8px 10px -5px rgba(125,113,0,0.8);
- text-align:center;
+ text-align:left;
overflow:hidden;
}
-.NOTICE_DATE
+.NOTICE_CONTAINER_OBSOLETE
+ {
+ margin:10px auto;
+ padding:10px;
+ background-image:linear-gradient(rgba(238,216,108,0.4) 0%,rgba(248,237,149,0.4) 15%,rgba(250,240,152,0.4) 100%);
+ box-shadow:0 8px 10px -5px rgba(125,113,0,0.4);
+ text-align:left;
+ overflow:hidden;
+ }
+.NOTICE_DATE_ACTIVE
{
float:right;
font-size:12pt;
color:#404040;
+ text-align:right;
overflow:hidden;
+ display:inline-block;
}
-.NOTICE_SUBJECT
+.NOTICE_DATE_OBSOLETE
{
+ float:right;
+ font-size:12pt;
+ color:#808080;
+ text-align:right;
+ overflow:hidden;
+ display:inline-block;
+ }
+.NOTICE_SUBJECT_ACTIVE
+ {
+ margin:12px auto;
font-size:15pt;
font-weight:bold;
color:#404040;
text-align:center;
overflow:hidden;
- display:inline-block;
}
-.NOTICE_TEXT
+.NOTICE_TEXT_ACTIVE
{
clear:both;
font-size:12pt;
- color:#000080;
+ color:#204080;
overflow:hidden;
}
-.NOTICE_AUTHOR
+.NOTICE_TEXT_OBSOLETE
+ {
+ clear:both;
+ font-size:12pt;
+ color:#4070A0;
+ overflow:hidden;
+ }
+.NOTICE_AUTHOR_ACTIVE
{
color:#404040;
font-size:12pt;
+ text-align:right;
+ overflow:hidden;
+ }
+.NOTICE_AUTHOR_OBSOLETE
+ {
+ color:#808080;
+ font-size:12pt;
+ text-align:right;
overflow:hidden;
}
@@ -390,8 +425,8 @@ form {margin:0; display:inline;}
.CONTEXT_OPT
{
display:inline;
- margin-left:9px;
- margin-right:9px;
+ margin-left:6px;
+ margin-right:6px;
}
/********************************* Frame 10 **********************************/
diff --git a/swad_announcement.c b/swad_announcement.c
index 9c08c9cdc..45b6d2150 100644
--- a/swad_announcement.c
+++ b/swad_announcement.c
@@ -48,7 +48,6 @@
/*****************************************************************************/
extern struct Globals Gbl;
-// extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/*****************************************************************************/
/************************* Internal global variables *************************/
@@ -208,15 +207,15 @@ static void Ann_ShowAnnouncement (long AnnCod,const char *Subject,const char *Co
bool RolesSelected;
/***** Start yellow note *****/
- fprintf (Gbl.F.Out,"
");
/***** Write the content of the announcement *****/
- fprintf (Gbl.F.Out,"
%s
",
+ fprintf (Gbl.F.Out,"
%s
",
Subject);
/***** Write the content of the announcement *****/
- fprintf (Gbl.F.Out,"
%s
",
+ fprintf (Gbl.F.Out,"
%s
",
Content);
/***** Write form *****/
diff --git a/swad_changelog.h b/swad_changelog.h
index 9ae9e053c..491e070ab 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -109,11 +109,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 15.32.2 (2015/10/31)"
+#define Log_PLATFORM_VERSION "SWAD 15.33 (2015/11/01)"
// 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.33: Nov 01, 2015 New layout of notices. (186708 lines)
Version 15.32.2: Oct 31, 2015 Fixed bug in form submit. (186618 lines)
Version 15.32.1: Oct 31, 2015 Dates in holidays are shown in big-endian.
All dates are now shown in ISO 8601 format (YYYY-MM-DD). (186627 lines)
@@ -138,7 +139,6 @@ Download JavaScript jstz script, available in:
Create new directory jstz in public HTML directory.
Copy script jstz.js from https://bitbucket.org/pellepim/jstimezonedetect/ > Download repository > pellepim-jstimezonedetect-3a00f59861bd.zip > dist > jstz.js to /var/www/html/swad/jstz/jstz.js
- (186302 lines)
Version 15.27: Oct 28, 2015 Fixed bug in dates. (186302 lines)
Version 15.26.1: Oct 27, 2015 Fixed bug in statistics. (186282 lines)
Version 15.26: Oct 27, 2015 Statistics are computed properly for clients with time-zones different to that of the server. (186278 lines)
diff --git a/swad_config.h b/swad_config.h
index 38b231bf6..f11675379 100644
--- a/swad_config.h
+++ b/swad_config.h
@@ -28,8 +28,8 @@
/** Uncomment one of the following installations of SWAD or create your own **/
/*****************************************************************************/
-//#define LOCALHOST_UBUNTU // Comment this line if not applicable
-#define OPENSWAD_ORG // Comment this line if not applicable
+#define LOCALHOST_UBUNTU // Comment this line if not applicable
+//#define OPENSWAD_ORG // Comment this line if not applicable
//#define SWAD_UGR_ES // Comment this line if not applicable
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
diff --git a/swad_notice.c b/swad_notice.c
index 7aa4dc23a..ac5e4863a 100644
--- a/swad_notice.c
+++ b/swad_notice.c
@@ -490,46 +490,88 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
extern const char *Txt_NOTICE_Obsolete_Mark_as_active;
extern const char *Txt_See_full_notice;
extern const char *Txt_Remove;
+ static const char *ContainerClass[Not_NUM_STATUS] =
+ {
+ "NOTICE_CONTAINER_ACTIVE", // Not_ACTIVE_NOTICE
+ "NOTICE_CONTAINER_OBSOLETE", // Not_OBSOLETE_NOTICE
+ };
+ static const char *DateClass[Not_NUM_STATUS] =
+ {
+ "NOTICE_DATE_ACTIVE", // Not_ACTIVE_NOTICE
+ "NOTICE_DATE_OBSOLETE", // Not_OBSOLETE_NOTICE
+ };
+ static const char *TextClass[Not_NUM_STATUS] =
+ {
+ "NOTICE_TEXT_ACTIVE", // Not_ACTIVE_NOTICE
+ "NOTICE_TEXT_OBSOLETE", // Not_OBSOLETE_NOTICE
+ };
+ static const char *AuthorClass[Not_NUM_STATUS] =
+ {
+ "NOTICE_AUTHOR_ACTIVE", // Not_ACTIVE_NOTICE
+ "NOTICE_AUTHOR_OBSOLETE", // Not_OBSOLETE_NOTICE
+ };
static unsigned UniqueId = 0;
struct UsrData UsrDat;
/***** Start yellow note *****/
- fprintf (Gbl.F.Out,"
",
Gbl.Prefs.IconsURL,
Txt_NOTICE_Obsolete_Mark_as_active,
Txt_NOTICE_Obsolete_Mark_as_active);
- Act_FormEnd ();
break;
}
- else // Don't put form to change the state of the notice
+ Act_FormEnd ();
+ }
+ else // Don't put forms
+ /* Status of the notice */
switch (NoticeStatus)
{
case Not_ACTIVE_NOTICE:
@@ -557,15 +599,16 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
}
}
- /* Write the date (DateTime is in YYYYMMDDHHMM format) */
+ /* Write the date */
UniqueId++;
- fprintf (Gbl.F.Out,"
");
+ fprintf (Gbl.F.Out,"
",
+ DateClass[NoticeStatus]);
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
{
/* Form to view full notice */
Act_FormStart (ActShoNot);
Not_PutHiddenParamNotCod (NotCod);
- Act_LinkFormSubmit (Txt_See_full_notice,"NOTICE_DATE");
+ Act_LinkFormSubmit (Txt_See_full_notice,DateClass[NoticeStatus]);
}
fprintf (Gbl.F.Out,"
",
UniqueId);
@@ -581,8 +624,8 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
UniqueId,(long) TimeUTC);
/***** Write the content of the notice *****/
- fprintf (Gbl.F.Out,"
%s",
- Content);
+ fprintf (Gbl.F.Out,"
%s",
+ TextClass[NoticeStatus],Content);
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
{
fprintf (Gbl.F.Out,"
");
@@ -603,7 +646,8 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
fprintf (Gbl.F.Out,"
");
/***** Write the author *****/
- fprintf (Gbl.F.Out,"
");
+ fprintf (Gbl.F.Out,"
",
+ AuthorClass[NoticeStatus]);
Usr_UsrDataConstructor (&UsrDat);
UsrDat.UsrCod = UsrCod;
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat)) // Get from the database the data of the autor
@@ -611,28 +655,6 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
Usr_UsrDataDestructor (&UsrDat);
fprintf (Gbl.F.Out,"
");
- /***** Write form to delete this notice *****/
- if (ICanEditNotices)
- {
- fprintf (Gbl.F.Out,"
");
-
- /* Form to delete notice */
- Act_FormStart (ActRemNot);
- Not_PutHiddenParamNotCod (NotCod);
- Act_LinkFormSubmit (Txt_Remove,The_ClassForm[Gbl.Prefs.Theme]);
- fprintf (Gbl.F.Out,"
"
- " %s",
- Gbl.Prefs.IconsURL,
- Txt_Remove,
- Txt_Remove,
- Txt_Remove);
- Act_FormEnd ();
-
- fprintf (Gbl.F.Out,"
");
- }
-
fprintf (Gbl.F.Out,"
");
}