Created
April 11, 2012 17:26
-
-
Save h4/2360717 to your computer and use it in GitHub Desktop.
Блок для карточки участника в мудл
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Mikhail Baranov <[email protected]> | |
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License | |
* @package block | |
* @subpackage vcard | |
* | |
* Block: simple html vcard presentation | |
* | |
*/ | |
class block_vcard extends block_base { | |
public function init() { | |
$this->title = get_string('pluginname', 'block_vcard'); | |
} | |
public function get_content () { | |
global $SESSION, $OUTPUT, $CFG; | |
//parent::init(); | |
//parent::get_content(); | |
$this->content = new stdClass; | |
$str = ''; | |
$str .= '<div class="block_vcard__vcard">'; | |
$str .= '<div class="block_vcard__photo">'; | |
$str .= '<img src="http://placehold.it/80x80" alt="">'; | |
$str .= '</div>'; | |
$str .= '<div class="block_vcard__details">'; | |
$str .= '<p class="block_vcard__field-label">Имя</p>'; | |
$str .= '<p><input type="text" /></p>'; | |
$str .= '<p class="block_vcard__field-label">Фамилия</p>'; | |
$str .= '<p><input type="text" /></p>'; | |
$str .= '<p class="block_vcard__field-label">Номер группы</p>'; | |
$str .= '<p><input type="text" /></p>'; | |
$str .= '<p class="block_vcard__field-label">Фото</p>'; | |
$str .= '<p><input type="file" /></p>'; | |
$str .= '<p class="block_vcard__submit"><input type="submit" value="Сохранить" /></p>'; | |
$str .= '</div>'; | |
$str .= '</div>'; | |
$this->content->text = $str; | |
return $this->content; | |
} | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.block_vcard__vcard { | |
position: fixed; | |
right:30px; | |
top:100px; | |
padding: 8px; | |
border:solid 1px #999; | |
background:#FFF; | |
} | |
.block_vcard__photo { | |
float: left; | |
width: 100px; | |
} | |
.block_vcard__details { | |
margin-left: 100px; | |
} | |
.block_vcard__field-label { | |
font-size:0.9em; | |
margin-bottom: 0px; | |
} | |
.block_vcard__submit { | |
text-align: right; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment