From 868e49c834fe39e5fd44a6489f213f541e10353e Mon Sep 17 00:00:00 2001 From: Li Chen Date: Sat, 26 Oct 2013 21:01:02 +0200 Subject: [PATCH] Add simple tpl for each php Change the home.css to common.css --- htdocs/css/{errors.css => common.css} | 0 htdocs/css/home.css | 3 --- onyx/include/team/exercice.php | 4 ++++ onyx/include/team/me.php | 3 +-- onyx/tpl/bootstrap/admin/import_exercices.tpl | 2 +- onyx/tpl/bootstrap/admin/import_users.tpl | 2 +- onyx/tpl/bootstrap/teams/exercice.tpl | 19 +++++++++++++++++++ onyx/tpl/bootstrap/teams/home.tpl | 2 +- onyx/tpl/bootstrap/teams/me.tpl | 11 +++++++++++ onyx/tpl/bootstrap/teams/summary.tpl | 11 +++++++++++ onyx/tpl/bootstrap/teams/team.tpl | 11 +++++++++++ 11 files changed, 60 insertions(+), 8 deletions(-) rename htdocs/css/{errors.css => common.css} (100%) delete mode 100644 htdocs/css/home.css create mode 100644 onyx/tpl/bootstrap/teams/exercice.tpl create mode 100644 onyx/tpl/bootstrap/teams/me.tpl create mode 100644 onyx/tpl/bootstrap/teams/summary.tpl create mode 100644 onyx/tpl/bootstrap/teams/team.tpl diff --git a/htdocs/css/errors.css b/htdocs/css/common.css similarity index 100% rename from htdocs/css/errors.css rename to htdocs/css/common.css diff --git a/htdocs/css/home.css b/htdocs/css/home.css deleted file mode 100644 index d9849a98..00000000 --- a/htdocs/css/home.css +++ /dev/null @@ -1,3 +0,0 @@ -body { - padding: 30px; -} diff --git a/onyx/include/team/exercice.php b/onyx/include/team/exercice.php index 84856f02..8f39277e 100644 --- a/onyx/include/team/exercice.php +++ b/onyx/include/team/exercice.php @@ -2,5 +2,9 @@ if(!defined('ONYX')) exit; +$exercice = new Exercice($EXERCICE); + +$template->assign("Exercice", $exercice); +//$template->assign("Number", $ex_number); return "teams/exercice"; diff --git a/onyx/include/team/me.php b/onyx/include/team/me.php index bf209f06..053de859 100644 --- a/onyx/include/team/me.php +++ b/onyx/include/team/me.php @@ -2,5 +2,4 @@ if(!defined('ONYX')) exit; - -return "teams/change"; +return "teams/me"; diff --git a/onyx/tpl/bootstrap/admin/import_exercices.tpl b/onyx/tpl/bootstrap/admin/import_exercices.tpl index 0cb0eb01..a06ec5ef 100644 --- a/onyx/tpl/bootstrap/admin/import_exercices.tpl +++ b/onyx/tpl/bootstrap/admin/import_exercices.tpl @@ -1,6 +1,6 @@ {extends file="layout-nav.tpl"} {block name=head} - + {/block} {block name=content}

diff --git a/onyx/tpl/bootstrap/admin/import_users.tpl b/onyx/tpl/bootstrap/admin/import_users.tpl index 1d96ee15..dece74da 100644 --- a/onyx/tpl/bootstrap/admin/import_users.tpl +++ b/onyx/tpl/bootstrap/admin/import_users.tpl @@ -1,6 +1,6 @@ {extends file="layout-nav.tpl"} {block name=head} - + {/block} {block name=content}

diff --git a/onyx/tpl/bootstrap/teams/exercice.tpl b/onyx/tpl/bootstrap/teams/exercice.tpl new file mode 100644 index 00000000..18f79635 --- /dev/null +++ b/onyx/tpl/bootstrap/teams/exercice.tpl @@ -0,0 +1,19 @@ +{extends file="layout-nav.tpl"} + +{block name=head} + +{/block} + +{block name=content} + +
+

Exercice {$Number} - X

+
    +
  • Difficulté : {$Exercice->statement}
  • +
  • Gain :
  • + +
  • Description
  • + +
      + +{/block} diff --git a/onyx/tpl/bootstrap/teams/home.tpl b/onyx/tpl/bootstrap/teams/home.tpl index 7ca69056..eee3529f 100644 --- a/onyx/tpl/bootstrap/teams/home.tpl +++ b/onyx/tpl/bootstrap/teams/home.tpl @@ -1,7 +1,7 @@ {extends file="layout-nav.tpl"} {block name=head} - + {/block} {block name=content} diff --git a/onyx/tpl/bootstrap/teams/me.tpl b/onyx/tpl/bootstrap/teams/me.tpl new file mode 100644 index 00000000..6f0ee940 --- /dev/null +++ b/onyx/tpl/bootstrap/teams/me.tpl @@ -0,0 +1,11 @@ +{extends file="layout-nav.tpl"} + +{block name=head} + +{/block} + +{block name=content} +

      + THIS IS ME +

      +{/block} diff --git a/onyx/tpl/bootstrap/teams/summary.tpl b/onyx/tpl/bootstrap/teams/summary.tpl new file mode 100644 index 00000000..52aeaa7c --- /dev/null +++ b/onyx/tpl/bootstrap/teams/summary.tpl @@ -0,0 +1,11 @@ +{extends file="layout-nav.tpl"} + +{block name=head} + +{/block} + +{block name=content} +

      + THIS IS SUMMARY +

      +{/block} diff --git a/onyx/tpl/bootstrap/teams/team.tpl b/onyx/tpl/bootstrap/teams/team.tpl new file mode 100644 index 00000000..60829725 --- /dev/null +++ b/onyx/tpl/bootstrap/teams/team.tpl @@ -0,0 +1,11 @@ +{extends file="layout-nav.tpl"} + +{block name=head} + +{/block} + +{block name=content} +

      + THIS IS TEAM +

      +{/block}