1 <div id="uploader-contents">
2 <!-- Photo album options and page numbers -->
3 <?php if ($this->action_permission || $this->album_info['type_id']==AT_PA_TYPE_COURSE_ALBUM): ?>
4 <div class="add_profile_photo">
5 <div class="profile_photo">
6 <img src="<?php echo 'get_profile_img.php?id='.$_SESSION['member_id'].SEP.'size=p';?>" title="<?php echo AT_print(get_display_name($_SESSION['member_id']), 'members.full_name'); ?>" alt="<?php _AT('profile_picture');?>" />
10 <form enctype="multipart/form-data" method="post" action="<?php echo AT_PA_BASENAME. 'albums.php'; ?>" class="">
12 <label for="single_uploader"><?php echo _AT('pa_choose_profile_picture');?></label>
13 <input type="file" id="single_uploader" name="photo">
16 <input type="hidden" name="id" value="<?php echo $this->album_info['id']; ?>"/>
17 <input type="submit" class="button" name="upload" value="<?php echo _AT('upload');?>" />
22 <div class="uploader">
23 <form method="post" action="<?php echo 'mods/_standard/profile_pictures/profile_picture.php'; ?>" class="">
25 <label><?php echo _AT('pa_delete_profile_pic_blub'); ?></label>
28 <input type="hidden" name="delete" value="1" />
29 <input type="submit" class="button" name="submit" value="<?php echo _AT('delete');?>" />
35 <?php endif; //action permission?>
37 <div class="album_panel">
39 <?php if($this->num_rows > AT_PA_PHOTOS_PER_PAGE): ?>
40 <div class="paginator">
41 <?php print_paginator($this->page, $this->num_rows, 'id='.$this->album_info['id'], AT_PA_PHOTOS_PER_PAGE, AT_PA_PAGE_WINDOW); ?>
45 <?php if(!empty($this->photos)): ?>
46 <!-- loop through this -->
47 <?php foreach($this->photos as $key=>$photo): ?>
48 <div class="photo_frame">
49 <a href="<?php echo AT_PA_BASENAME.'photo.php?pid='.$photo['id'].SEP.'aid='.$this->album_info['id'];?>"><img src="<?php echo AT_PA_BASENAME.'get_photo.php?aid='.$this->album_info['id'].SEP.'pid='.$photo['id'].SEP.'ph='.getPhotoFilePath($photo['id'], '', $photo['created_date']);?>" title="<?php echo AT_print($photo['description'], 'photo_albums.description'); ?>" alt="<?php echo AT_print($photo['alt_text'], 'photo_albums.alt_text');?>" /></a>
53 <div class="album_description">
54 <p><?php if($this->album_info['location']!='') echo _AT('location').': '.AT_print($this->album_info['location'], 'albums.location') .'<br/>';?>
55 <?php echo AT_print($this->album_info['description'], 'albums.description');?></p>
58 <div class="edit_photo_box">
59 <p><?php echo _AT('pa_no_photos'); ?></p>
64 <?php if($this->num_rows > AT_PA_PHOTOS_PER_PAGE): ?>
65 <div class="paginator">
66 <?php print_paginator($this->page, $this->num_rows, 'id='.$this->album_info['id'], AT_PA_PHOTOS_PER_PAGE, AT_PA_PAGE_WINDOW); ?>
73 <div class="comment_panel">
74 <div class="comment_feeds">
75 <?php if (!empty($this->comments)): ?>
76 <?php foreach($this->comments as $k=>$comment_array): ?>
77 <div class="comment_box" id="comment_box">
78 <!-- TODO: Profile link and img -->
79 <?php if ($this->action_permission || $comment_array['member_id']==$_SESSION['member_id']): ?>
80 <div class="flc-inlineEditable">
81 <a href="profile.php?id=<?php echo $comment_array['member_id'];?>"><strong><?php echo AT_print(get_display_name($comment_array['member_id']), 'members.full_name'); ?></a></strong>
82 <span class="flc-inlineEdit-text" id="<?php echo $comment_array['id'];?>" ><?php echo AT_print($comment_array['comment'], 'photo_albums.comment');?></span>
86 <a href="profile.php?id=<?php echo $comment_array['member_id'];?>"><strong><?php echo AT_print(get_display_name($comment_array['member_id']), 'members.full_name'); ?></a></strong>
87 <?php echo htmlentities_utf8($comment_array['comment'], true);?>
90 <div class="comment_actions">
91 <!-- TODO: if author, add in-line "edit" -->
92 <?php echo AT_date(_AT('forum_date_format'), $comment_array['created_date'], AT_DATE_MYSQL_DATETIME);?>
93 <?php if ($this->action_permission || $comment_array['member_id']==$_SESSION['member_id']): ?>
94 <a href="<?php echo AT_PA_BASENAME.'delete_comment.php?aid='.$this->album_info['id'].SEP.'comment_id='.$comment_array['id']?>"><?php echo _AT('delete');?></a>
98 <?php endforeach; endif;?>
99 <!-- TODO: Add script to check, comment cannot be empty. -->
101 <form action="<?php echo AT_PA_BASENAME;?>addComment.php" method="post" class="input-form">
102 <div class="row"><label for="comments"><?php echo _AT('comments');?></label></div>
103 <div class="row"><textarea name="comment" id="comment_template" onclick="jQuery(this).hide();c=jQuery('#comment');c.show();c.focus();" onkeyup="jQuery(this).hide();c=jQuery('#comment');c.show();c.focus();"><?php echo _AT('pa_write_a_comment'); ?></textarea></div>
104 <div class="row"><textarea name="comment" id="comment" style="display:none;"></textarea></div>
106 <input type="hidden" name="aid" value="<?php echo $this->album_info['id'];?>" />
107 <input type="submit" name="submit" value="<?php echo _AT('comment');?>" class="button"/>
113 <?php if($this->action_permission): ?>
114 <div class="photo_actions">
115 <a href="<?php echo AT_PA_BASENAME.'edit_photos.php?aid='.$this->album_info['id']; ?>" class="pa_tool_link"><img src="<?php echo $_base_href; ?>themes/<?php echo $_SESSION['prefs']['PREF_THEME']; ?>/images/edit.gif" alt="" border="0" class="pa_tool_image"/><?php echo _AT('pa_edit_photos'); ?></a><br/>
116 <a href="<?php echo AT_PA_BASENAME.'edit_photos.php?aid='.$this->album_info['id'].SEP.'org=1'; ?>" class="pa_tool_link"><img src="<?php echo $_base_href; ?>themes/<?php echo $_SESSION['prefs']['PREF_THEME']; ?>/images/photos_arrange.png" alt="" border="0" class="pa_tool_image"/><?php echo _AT('pa_organize_photos'); ?></a><br/>
123 <script type="text/javascript">
125 /* Fluid inline editor */
126 jQuery(document).ready(function () {
127 //the ATutor undo function
128 var undo = function (that, targetContainer) {
129 var markup = "<span class='flc-undo' aria-live='polite' aria-relevant='all'>" +
130 "<span class='flc-undo-undoContainer'><a href='#' class='flc-undo-undoControl'>[<?php echo _AT('pa_undo'); ?>]</a></span>" +
131 "<span class='flc-undo-redoContainer'><a href='#' class='flc-undo-redoControl'>[<?php echo _AT('pa_redo'); ?>]</a></span>" +
133 var markupNode = jQuery(markup);
134 targetContainer.append(markupNode);
137 var pa_click_here_to_edit = '<?php echo _AT("pa_click_here_to_edit"); ?>';
138 var pa_click_item_to_edit = '<?php echo _AT("pa_click_item_to_edit"); ?>';
140 fluid.inlineEdits(".comment_feeds", {
141 componentDecorators: {
142 type: "fluid.undoDecorator",
147 defaultViewText: pa_click_here_to_edit,
149 tooltipText: pa_click_item_to_edit,
151 modelChanged: function(model, oldModel, source){
152 /* for undo/redo model change */
153 if (model != oldModel && source != undefined){
154 commentID = source.component.locate("text").attr("id");
155 rtn = jQuery.post("<?php echo $_base_path. AT_PA_BASENAME.'edit_comment.php';?>",
157 "aid":<?php echo $this->album_info['id'];?>,
159 "comment":model.value},
164 afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {
165 if (newValue != oldValue){
166 rtn = jQuery.post("<?php echo $_base_path. AT_PA_BASENAME.'edit_comment.php';?>",
168 "aid":<?php echo $this->album_info['id'];?>,