* along with Fusionforge. If not, see <http://www.gnu.org/licenses/>.
*/
-require_once('Widget.class.php');
+require_once 'Widget.class.php';
require_once $gfcommon.'include/utils.php';
require_once $gfwww.'include/html.php';
require_once $gfcommon.'tracker/ArtifactTypeFactory.class.php';
*
* Artifact assigned to or submitted by or monitored by this person
*/
+
class Widget_MyArtifacts extends Widget {
var $_artifact_show;
- function Widget_MyArtifacts() {
+ function __construct() {
$this->Widget('myartifacts');
$this->_artifact_show = UserManager::instance()->getCurrentUser()->getPreference('my_artifacts_show');
if($this->_artifact_show === false) {
}
function getContent() {
- $html_my_artifacts = '<table style="width:100%">';
+
$atf = new ArtifactsForUser(@UserManager::instance()->getCurrentUser());
$my_artifacts = array();
if ($this->_artifact_show == 'ASM'){
}
if (count($my_artifacts) > 0) {
+ $html_my_artifacts = '<table style="width:100%">';
$html_my_artifacts .= $this->_display_artifacts($my_artifacts, 1);
+ $html_my_artifacts .= '</table>';
} else {
- $html_my_artifacts .= '<tr><td colspan="3">' .
- _("You have no artifacts.") . '</td></tr>';
+ $html_my_artifacts = '<div class="warning">'. _("You have no artifacts") . '</div>';
}
- $html_my_artifacts .= '<tr><td colspan="3">'.(($this->_artifact_show == 'N' || count($my_artifacts) > 0)?' ':_("None")).'</td></tr>';
- $html_my_artifacts .= '</table>';
+
return $html_my_artifacts;
}
//work on the tracker of the last round if there was one
if ($atid_old != 0 && $count_aids != 0) {
list($hide_now,$count_diff,$hide_url) = my_hide_url('artifact',$atid_old,$hide_item_id,$count_aids,$hide_artifact);
- $html_hdr = ($j ? '<tr class="boxitem"><td colspan="3">' : '').
+ $html_hdr = '<tr class="boxitem"><td colspan="3">'.
$hide_url.
util_make_link('/tracker/?group_id='.$group_id_old, $group_name, array('class'=>'tabtitle-nw', 'title'=>_('Browse Trackers List for this project'))).
' - '.
return _("List artifacts you have submitted or assigned to you or you are monitoring, by project.");
}
}
-
-?>