Kaynağa Gözat

Improvements to the project view.

Iñigo Valentin 9 yıl önce
ebeveyn
işleme
7146be4f05
4 değiştirilmiş dosya ile 32 ekleme ve 7 silme
  1. 6 0
      sql/text.sql
  2. 16 2
      www/css/project.css
  3. 5 0
      www/css/ui.css
  4. 5 5
      www/project/project.php

+ 6 - 0
sql/text.sql

@@ -28,3 +28,9 @@ INSERT INTO text VALUES ('FOOTER_HELP',   'en', 'FOOTER', 'Help');
 INSERT INTO text VALUES ('FOOTER_FOLLOW', 'eu', 'FOOTER', 'Jarraitu');
 INSERT INTO text VALUES ('FOOTER_COPY',   'eu', 'FOOTER', 'Copyright Iñigo Valentin 2014 - 2017');
 INSERT INTO text VALUES ('FOOTER_HELP',   'eu', 'FOOTER', 'Laguntza');
+
+
+-- PROJECT
+INSERT INTO text VALUES ('PROJECT_VERSION', 'es', 'PROJECT', 'Versión');
+INSERT INTO text VALUES ('PROJECT_VERSION', 'en', 'PROJECT', 'Version');
+INSERT INTO text VALUES ('PROJECT_VERSION', 'eu', 'PROJECT', 'Versión');

+ 16 - 2
www/css/project.css

@@ -1,3 +1,16 @@
+/* Common elements */
+span.version_type{
+    padding: 0.05em;
+    border 0.1em solid #444444;
+    border-radius: 0.2em;
+}
+
+
+/* Projects main page */
+
+
+/* Project view page */
+
 div#content{
     display: table;
 }
@@ -9,14 +22,15 @@ div#content-row{
 div.content_cell{
     display: table-cell;
     padding: 1em;
+    vertical-align: top;
 }
 
 div#content_cell_main{
-    width: 85%;
+    width: 80%;
 }
 
 div#content_cell_right{
-    width: 15%;
+    width: 20%;
 }
 
 div#main_column{

+ 5 - 0
www/css/ui.css

@@ -31,6 +31,11 @@ a{
     font-weight: bold;
 }
 
+/* Hidden elements */
+.hidden{
+    display: none;
+}
+
 
 
 /**********************************

+ 5 - 5
www/project/project.php

@@ -137,15 +137,15 @@
                             while ($r_url = mysqli_fetch_array($q_url)){
 ?>
                                 <div class='url'>
-                                    <a target='_blank' title='<?=text($con, $r_url["summary"], $lang);?>' href='<?=text($con, $r_url["url"], $lang);?>'>
+                                    <a target='_blank' title='<?=text($con, $r_url["title"], $lang);?>' href='<?=text($con, $r_url["url"], $lang);?>'>
 <?php
                                         if (strlen($r_url["logo"]) > 0){
 ?>
-                                            <img title='<?=text($con, $r_url["summary"], $lang);?>' src='<?=$server?>/img/url/<?=$r_url["logo"]?>'/>
+                                            <img title='<?=text($con, $r_url["title"], $lang);?>' src='<?=$server?>/img/url/<?=$r_url["logo"]?>'/>
 <?php
                                         }
 ?>
-                                        <?=text($con, $r_url["title"], $lang);?>
+                                        <?=text($con, $r_url["summary"], $lang);?>
                                     </a>
                                 </div> <!-- .url -->
 <?php
@@ -154,7 +154,7 @@
                         </div> <!-- .entry -->
                         <div class='entry'>
 <?php
-                            $q_license = mysqli_query($con, "SELECT * FROM license WHERE id = $r_project[license];");
+                            $q_license = mysqli_query($con, "SELECT * FROM license WHERE id = '$r_project[license]';");
                             $r_license = mysqli_fetch_array($q_license);
 ?>
                             <span class='hidden' id='license_id'><?=$r_license["id"]?></span>
@@ -168,7 +168,7 @@
                             $q_version = mysqli_query($con, "SELECT version_name, project_version.summary AS summary, dtime, title, project_version_type.summary AS vsummary, color FROM project_version, project_version_type WHERE type = id AND visible = 1 AND project = $id ORDER BY dtime DESC LIMIT 1;");
                             $r_version = mysqli_fetch_array($q_version);
 ?>
-                            TR#Version: <?=$r_version["version_name"]?>
+                            <?=text($con, 'PROJECT_VERSION', $lang)?> <?=$r_version["version_name"]?>
                             <span class='version_type' style='background-color: <?=$r_version["color"]?>'>
                                 <?=text($con, $r_version["title"], $lang)?>
                             </span>